Fixes #309079 Fix a memory leak
authorHarish Krishnaswamy <kharish@novell.com>
Sat, 2 Jul 2005 07:08:11 +0000 (07:08 +0000)
committerHarish Krishnaswamy <kharish@src.gnome.org>
Sat, 2 Jul 2005 07:08:11 +0000 (07:08 +0000)
2005-07-02  Harish Krishnaswamy  <kharish@novell.com>
Fixes #309079
* libecal/e-cal.c: (e_cal_create_object): Fix a memory leak

calendar/ChangeLog
calendar/libecal/e-cal.c

index bb215f7..92d1536 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-02  Harish Krishnaswamy  <kharish@novell.com>
+
+       Fixes #309079
+       * libecal/e-cal.c: (e_cal_create_object): Fix
+       memory leak
+
 2005-06-23  Chenthill Palanisamy  <pchenthill@novell.com>
 
        * backends/http/Makefile.am: Removed unnecessary
index 8344f3a..a36a49e 100644 (file)
@@ -4023,6 +4023,10 @@ e_cal_create_object (ECal *ecal, icalcomponent *icalcomp, char **uid, GError **e
        status = our_op->status;
        if (uid)
                *uid = our_op->uid;
+       else {
+               g_free (our_op->uid);
+               our_op->uid = NULL;
+       }
        
        e_calendar_remove_op (ecal, our_op);
        g_mutex_unlock (our_op->mutex);