From f17eeede1e945a19650636a21b9d8a5c2c94a89c Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 6 Jun 2011 15:03:26 -0600 Subject: [PATCH] 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. --- daemon/libvirtd.c | 1 + 1 file changed, 1 insertion(+) 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)