[Mail] Bug in main_system_beep?

Karl Relton <[email protected]> Fri, 16 Mar 2007 20:06:43 +0000
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
Now the release is done (congrats) - is it worth someone taking a look at my post from a
couple of weeks back ... ?

---

Hi all


Whilst looking at the code for other things, I think I have spotted a
bug in main_system_beep() in mail-session.c.

Comparing the beep function with play_sound function:

session_play_sound() and main_play_sound() do a
camel_object_ref(session) and a camel_object_unref(session) between
them.

However, session_system_beep() and main_system_beep() does the
camel_object_ref(session) but without the corresponding unref.

I assume thats wrong - the  patch below fixes that by putting in the
unref.

Karl

--- mail-session.c.old  2007-03-02 11:31:23.000000000 +0000
+++ mail-session.c      2007-03-02 11:29:42.000000000 +0000
@@ -441,6 +441,7 @@ static void
 main_system_beep (CamelFilterDriver *driver, gpointer user_data)
 {
        gdk_beep ();
+       camel_object_unref (session);
 }
 
 static void