1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-11 09:17:52 +03:00

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 <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2016-03-24 10:48:30 +01:00
parent 9b48ef9c51
commit 68b726b93c

View File

@ -54,6 +54,7 @@ adminConnectListServers(virNetDaemonPtr dmn,
srvs = NULL; srvs = NULL;
} }
cleanup: cleanup:
virObjectListFreeCount(srvs, ret);
return ret; return ret;
} }