[gmime] Fixed a memory leak in g_mime_object_set_content_disposition_parameter



commit 7f462228f179c04ad7dfd1a43de39feaf8dfb607
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Sun Dec 29 17:38:13 2013 -0500

    Fixed a memory leak in g_mime_object_set_content_disposition_parameter
    
    2013-12-29  Jeffrey Stedfast  <fejj gnome org>
    
        * gmime/gmime-object.c
        (g_mime_object_set_content_disposition_parameter): Unref the
        disposition. Thanks to Mario Theodoridis for this patch.

 ChangeLog            |    6 ++++++
 gmime/gmime-object.c |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4964048..bf14df5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-29  Jeffrey Stedfast  <fejj gnome org>
+
+       * gmime/gmime-object.c
+       (g_mime_object_set_content_disposition_parameter): Unref the
+       disposition. Thanks to Mario Theodoridis for this patch.
+
 2013-11-02  Jeffrey Stedfast  <fejj gnome org>
 
        * gmime/gmime-message.c (write_references): Don't write out 2
diff --git a/gmime/gmime-object.c b/gmime/gmime-object.c
index 6d326f2..790e41e 100644
--- a/gmime/gmime-object.c
+++ b/gmime/gmime-object.c
@@ -647,6 +647,7 @@ g_mime_object_set_content_disposition_parameter (GMimeObject *object, const char
        if (!object->disposition) {
                disposition = g_mime_content_disposition_new ();
                _g_mime_object_set_content_disposition (object, disposition);
+               g_object_unref (disposition);
        }
        
        g_mime_content_disposition_set_parameter (object->disposition, name, value);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]