Fix two memory leaks around use of privacy_get_system_ids().
authorAndrej Kacian <ticho@claws-mail.org>
Mon, 10 Jul 2017 15:56:09 +0000 (17:56 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Mon, 10 Jul 2017 15:56:09 +0000 (17:56 +0200)
src/compose.c
src/prefs_account.c

index bd34f43..08e765b 100644 (file)
@@ -1321,6 +1321,7 @@ static void compose_force_encryption(Compose *compose, PrefsAccount *account,
                if (privacy_avail && g_slist_length(privacy_avail)) {
                        privacy = (gchar *)(privacy_avail->data);
                }
+               g_slist_free_full(privacy_avail, g_free);
        }
        if (privacy != NULL) {
                if (system) {
index 513ba6b..9934321 100644 (file)
@@ -962,7 +962,10 @@ static void update_privacy_system_menu() {
                                COMBOBOX_SENS, TRUE,
                                COMBOBOX_PRIVACY_PLUGIN_ID, id,
                                -1);
+               g_free(id);
        }
+       g_slist_free(system_ids);
+
 }
 
 #define TABLE_YPAD 2