From: Eric Blake Date: Mon, 6 Jun 2011 21:03:26 +0000 (-0600) Subject: daemon: plug memory leak X-Git-Tag: v0.9.3-rc1~204 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f17eeede1e945a19650636a21b9d8a5c2c94a89c;p=thirdparty%2Flibvirt.git daemon: plug memory leak 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. --- diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 728031f0c2..bcaa37b444 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)