[PATCH 13/12] daemon: plug memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Detected by Coverity.  Commit ef21beda was incomplete; it solved
a leak one one path, but not on the other.

* daemon/libvirtd.c (qemudSetLogging): Avoid leak on success.
---

How embarrassing that I was just barely fixing a leak of the
same variable in this function, but only got half the job done.

 daemon/libvirtd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 728031f..bcaa37b 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -2783,6 +2783,7 @@ qemudSetLogging(struct qemud_server *server, virConfPtr conf,
                     VIR_FREE(userdir);
                     goto out_of_memory;
                 }
+                VIR_FREE(userdir);
             }
         } else {
             if (virAsprintf(&tmp, "%d:stderr", virLogGetDefaultPriority()) < 0)
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]