Commit 95557203 authored by spiiroin's avatar spiiroin

[systemd] Fix memory leak on systemd_control_service() error path

If dbus_connection_send_with_reply_and_block() should set the
dbus error, it is never freed.

Make sure dbus_error_free() is called before returning from the function.
Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
parent de044e25
......@@ -96,6 +96,7 @@ int systemd_control_service(const char *name, const char *method)
quit:
dbus_connection_close(bus);
dbus_connection_unref(bus);
dbus_error_free(&error);
return(ret);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment