From 68b726b93c11cc9089713667b313cae46e18a16b Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Thu, 24 Mar 2016 10:48:30 +0100 Subject: [PATCH] admin_server: fix memory leak If caller of adminConnectListServers() pass NULL instead of servers we need to free the list we've received from virNetDaemonGetServers(). Signed-off-by: Pavel Hrdina --- daemon/admin_server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/admin_server.c b/daemon/admin_server.c index 1d16bc9e93..85cec4627c 100644 --- a/daemon/admin_server.c +++ b/daemon/admin_server.c @@ -54,6 +54,7 @@ adminConnectListServers(virNetDaemonPtr dmn, srvs = NULL; } cleanup: + virObjectListFreeCount(srvs, ret); return ret; }