mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
9b48ef9c51
commit
68b726b93c
|
@ -54,6 +54,7 @@ adminConnectListServers(virNetDaemonPtr dmn,
|
|||
srvs = NULL;
|
||||
}
|
||||
cleanup:
|
||||
virObjectListFreeCount(srvs, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue