提交 a3b168d0 编写于 作者: M Michal Privoznik

virSystemdGetMachineNameByPID: Initialize @reply

I've noticed that variable @reply is not initialized and if
something at the beginning of the function fails, e.g.
virDBusGetSystemBus(), the control jump straight to cleanup label
where dbus_message_unref() is then called over this uninitialized
variable.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 065054da
......@@ -181,7 +181,7 @@ char *
virSystemdGetMachineNameByPID(pid_t pid)
{
DBusConnection *conn;
DBusMessage *reply;
DBusMessage *reply = NULL;
char *name = NULL, *object = NULL;
if (virDBusIsServiceEnabled("org.freedesktop.machine1") < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册