提交 34111a60 编写于 作者: J Ján Tomko

tools: do not leak uri in disconnect handler

Commit 035947eb introduced a call to virConnectGetURI
without a matching free() in virshCatchDisconnect.

Also fix vshAdmCatchDisconnect where it was copied by
commit 6dd7e42d.

https://bugzilla.redhat.com/show_bug.cgi?id=1303891
上级 bde6e002
......@@ -124,6 +124,7 @@ virshCatchDisconnect(virConnectPtr conn,
break;
}
vshError(ctl, _(str), NULLSTR(uri));
VIR_FREE(uri);
if (error) {
virSetError(error);
......
......@@ -92,6 +92,7 @@ vshAdmCatchDisconnect(virAdmConnectPtr conn ATTRIBUTE_UNUSED,
}
vshError(ctl, _(str), NULLSTR(uri));
VIR_FREE(uri);
if (error) {
virSetError(error);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册