[Commits] [SCM] claws branch, master, updated. 4.1.0-4-g107cee427

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


The branch, master has been updated
       via  107cee427a9e56f6c79fc472a2959445f0673f77 (commit)
      from  befad908068b6f72f0af446ff55f791d1ad3ff9c (commit)

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


- Log -----------------------------------------------------------------
commit 107cee427a9e56f6c79fc472a2959445f0673f77
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 a0f8f66ac..50e14e631 100644
--- a/src/plugins/gdata/cm_gdata_contacts.c
+++ b/src/plugins/gdata/cm_gdata_contacts.c
@@ -770,6 +770,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