activation: Don't leak if delivering activation message is forbidden
authorSimon McVittie <smcv@collabora.com>
Fri, 17 Aug 2018 14:42:17 +0000 (15:42 +0100)
committerSimon McVittie <smcv@collabora.com>
Mon, 3 Dec 2018 16:32:31 +0000 (16:32 +0000)
This is technically a denial of service because the dbus-daemon will
run out of memory eventually, but it's a very slow and noisy one,
because all the rejected messages are also very likely to have
been logged to the system log.

Detected by AddressSanitizer.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Resolves: https://gitlab.freedesktop.org/dbus/dbus/issues/234
Reviewed-by: pwithnall
bus/activation.c

index 6f009f5..99404b9 100644 (file)
@@ -1267,6 +1267,7 @@ bus_activation_send_pending_auto_activation_messages (BusActivation  *activation
                                                  entry->activation_message);
                 }
 
+              dbus_error_free (&error);
               link = next;
               continue;
             }