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: Michal Privoznik <mprivozn@redhat.com>
virSystemdGetMachineNameByPID(pid_t pid)
{
DBusConnection *conn;
- DBusMessage *reply;
+ DBusMessage *reply = NULL;
char *name = NULL, *object = NULL;
if (virDBusIsServiceEnabled("org.freedesktop.machine1") < 0)