Fix CID 1491353: resource leak.
authorwwp <subscript@free.fr>
Thu, 30 Sep 2021 09:03:35 +0000 (11:03 +0200)
committerwwp <subscript@free.fr>
Thu, 30 Sep 2021 09:03:35 +0000 (11:03 +0200)
src/plugins/vcalendar/vcal_meeting_gtk.c

index 8a019113bd6c25ece64a44d4e7f9ac60cf453f45..92b9861c155a55c9ecdd137e304c2714e0df8c97 100644 (file)
@@ -1929,8 +1929,6 @@ gboolean vcal_meeting_export_calendar(const gchar *path,
        if (str_write_to_file(icalcomponent_as_ical_string(calendar), internal_file, TRUE) < 0) {
                g_warning("can't export internal cal");
        }
-       
-       g_free(internal_file);
 
        for (cur = subs; cur; cur = cur->next) {
                /* Not to be freed */
@@ -1953,6 +1951,7 @@ gboolean vcal_meeting_export_calendar(const gchar *path,
        icalcomponent_free(calendar);
        
 putfile:
+       g_free(internal_file);
        g_slist_free(list);
        g_slist_free(subs);