mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
tools: do not leak uri in disconnect handler
Commit035947e
introduced a call to virConnectGetURI without a matching free() in virshCatchDisconnect. Also fix vshAdmCatchDisconnect where it was copied by commit6dd7e42
. https://bugzilla.redhat.com/show_bug.cgi?id=1303891
This commit is contained in:
parent
bde6e002b5
commit
34111a60f8
@ -124,6 +124,7 @@ virshCatchDisconnect(virConnectPtr conn,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
vshError(ctl, _(str), NULLSTR(uri));
|
vshError(ctl, _(str), NULLSTR(uri));
|
||||||
|
VIR_FREE(uri);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
virSetError(error);
|
virSetError(error);
|
||||||
|
@ -92,6 +92,7 @@ vshAdmCatchDisconnect(virAdmConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
|
|
||||||
vshError(ctl, _(str), NULLSTR(uri));
|
vshError(ctl, _(str), NULLSTR(uri));
|
||||||
|
VIR_FREE(uri);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
virSetError(error);
|
virSetError(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user