diff options
author | promarbler14 <[email protected]> | 2025-05-08 18:46:07 -0400 |
---|---|---|
committer | Luke from DC <[email protected]> | 2025-07-10 19:01:27 +0000 |
commit | 7ed54960995ef18d5fff9092b839565080456a40 (patch) | |
tree | ee02786df4a7136f4e364283ab270a2b09e793a6 | |
parent | 4eb7c11eaffc769bd1d75739e710230b28e2882e (diff) | |
download | mate-notification-daemon-7ed54960995ef18d5fff9092b839565080456a40.tar.bz2 mate-notification-daemon-7ed54960995ef18d5fff9092b839565080456a40.tar.xz |
Returning an error for a dbus method is counted as handling a method invocation. Return true in the handler to avoid a use-after-free.
-rw-r--r-- | src/daemon/daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index ef83301..2064c46 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -1371,7 +1371,7 @@ static gboolean notify_daemon_notify_handler(NotifyDaemonNotifications *object, if (g_hash_table_size (daemon->notification_hash) > MAX_NOTIFICATIONS) { g_dbus_method_invocation_return_error (invocation, notify_daemon_error_quark(), 1, _("Exceeded maximum number of notifications")); - return FALSE; + return TRUE; } /* Grab the settings */ @@ -1676,7 +1676,7 @@ static gboolean notify_daemon_close_notification_handler(NotifyDaemonNotificatio if (id == 0) { g_dbus_method_invocation_return_error (invocation, notify_daemon_error_quark(), 100, _("%u is not a valid notification ID"), id); - return FALSE; + return TRUE; } else { |