diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-10-31 11:53:56 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-11-15 16:29:53 +0100 |
commit | 645a9e5a2bbb06464a3fba1a3501e9d79e5bbad8 (patch) | |
tree | 3d24f75fdf7a6a4cc4e13b6d602c04619896482f | |
parent | bb11271068ff34434f5b8cefd0c2c0bae5ed7fd1 (diff) |
dbus-manager: fix a fatal dbus abort in bus_manager_message_handler()
If ListUnitFiles fails, or an OOM occurs, then dbus_message_unref()
will be called twice on "reply", causing systemd to crash. So remove
the call to dbus_message_unref(); it is unnecessary because of
the cleanup attribute on "reply".
[zj: modified to leave one dbus_message_unref() alone, per Colin
Walters' comment.]
-rw-r--r-- | src/core/dbus-manager.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 2010241e6a..3cf3e90a36 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -1436,7 +1436,6 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, r = unit_file_get_list(m->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, NULL, h); if (r < 0) { unit_file_list_free(h); - dbus_message_unref(reply); return bus_send_error_reply(connection, message, NULL, r); } |