提交 c4a4c01e 编写于 作者: W Wang King 提交者: Michal Privoznik

util: Don't leak @reply in virSystemdGetMachineNameByPID

@reply is a DBusMessage object returned by virDBusCallMethod in
get machine object call path, dereference it before calling
virDBusCallMethod again to get machine name.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 f7c7f450
......@@ -247,6 +247,9 @@ virSystemdGetMachineNameByPID(pid_t pid)
if (virDBusMessageRead(reply, "o", &object) < 0)
goto cleanup;
virDBusMessageUnref(reply);
reply = NULL;
VIR_DEBUG("Domain with pid %lld has object path '%s'",
(long long) pid, object);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册