[Commits] [SCM] claws branch, gtk2, updated. 3.19.0-13-g2244bd9fb

mones at claws-mail.org mones at claws-mail.org
Sat May 7 16:03:23 UTC 2022


The branch, gtk2 has been updated
       via  2244bd9fb61dd2800415f3b460512a47edb33698 (commit)
      from  70f51b79e4d63644439b3eb082b1ebfdc5cd32b0 (commit)

Summary of changes:
 src/plugins/gdata/cm_gdata_contacts.c | 10 ++++++++++
 1 file changed, 10 insertions(+)


- Log -----------------------------------------------------------------
commit 2244bd9fb61dd2800415f3b460512a47edb33698
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat May 7 16:29:50 2022 +0200

    Fix CID 1491331: "cached_contact" going out of scope leaks

diff --git a/src/plugins/gdata/cm_gdata_contacts.c b/src/plugins/gdata/cm_gdata_contacts.c
index c2aa1b694..8ff533755 100644
--- a/src/plugins/gdata/cm_gdata_contacts.c
+++ b/src/plugins/gdata/cm_gdata_contacts.c
@@ -768,6 +768,16 @@ void cm_gdata_load_contacts_cache_from_file(void)
       }
       else {
         debug_print("Ignored contact without email address: %s\n", cached_contact->full_name ? cached_contact->full_name : "(null)");
+        /* Not added to list: return allocated memory */
+        if (cached_contact->full_name)
+            g_free(cached_contact->full_name)
+        if (cached_contact->given_name)
+            g_free(cached_contact->given_name)
+        if (cached_contact->family_name)
+            g_free(cached_contact->family_name)
+        if (cached_contact->address)
+            g_free(cached_contact->address)
+        g_free(cached_contact)
       }
     }
   }

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list