From fe3b0cf30499eb12103dcc1c995cbc4dc1afc069 Mon Sep 17 00:00:00 2001 From: Vivek Jain Date: Mon, 11 Jul 2005 06:36:29 +0000 Subject: check whether memory could be allocated. Return if the message is NULL so 2005-07-11 Vivek Jain * new-mail-notify.c :(send_dbus_message) check whether memory could be allocated. Return if the message is NULL so that we don't unref it again, will save crash. **Fixes #274329 sort of bugs, in case reported even after david's fix. svn path=/trunk/; revision=29705 --- plugins/new-mail-notify/ChangeLog | 8 ++++++++ plugins/new-mail-notify/new-mail-notify.c | 3 +++ 2 files changed, 11 insertions(+) (limited to 'plugins') diff --git a/plugins/new-mail-notify/ChangeLog b/plugins/new-mail-notify/ChangeLog index 7e1a61ee49..043f38e422 100644 --- a/plugins/new-mail-notify/ChangeLog +++ b/plugins/new-mail-notify/ChangeLog @@ -1,3 +1,11 @@ +2005-07-11 Vivek Jain + + * new-mail-notify.c :(send_dbus_message) + check whether memory could be allocated. Return if the + message is NULL so that we don't unref it again, will save crash. + **Fixes #274329 sort of bugs, in case reported even after + david's fix. + 2005-05-11 Not Zed * Makefile.am: added built_sources/cleanfiles diff --git a/plugins/new-mail-notify/new-mail-notify.c b/plugins/new-mail-notify/new-mail-notify.c index 872fa80c62..dba602acf0 100644 --- a/plugins/new-mail-notify/new-mail-notify.c +++ b/plugins/new-mail-notify/new-mail-notify.c @@ -57,6 +57,9 @@ send_dbus_message (const char *message_name, const char *data) DBUS_INTERFACE, message_name); + if (message == NULL) + return; + /* Appends the data as an argument to the message */ dbus_message_append_args (message, #if DBUS_VERSION >= 310 -- cgit