mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
virt-admin: Don't leak uri in cmdSrvList
virAdmConnectGetURI() returns string that needs to be free()'d but we haven't done that. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
8fcb81d2de
commit
724d5340bd
@ -323,7 +323,7 @@ cmdSrvList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
||||
int nsrvs = 0;
|
||||
size_t i;
|
||||
bool ret = false;
|
||||
const char *uri = NULL;
|
||||
char *uri = NULL;
|
||||
virAdmServerPtr *srvs = NULL;
|
||||
vshAdmControlPtr priv = ctl->privData;
|
||||
|
||||
@ -347,6 +347,7 @@ cmdSrvList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
||||
virAdmServerFree(srvs[i]);
|
||||
VIR_FREE(srvs);
|
||||
}
|
||||
VIR_FREE(uri);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user