[Commits] [SCM] claws branch, master, updated. 3.16.0-97-g65c3537

wwp at claws-mail.org wwp at claws-mail.org
Mon Mar 26 14:02:45 CEST 2018


The branch, master has been updated
       via  65c35376f94c39d2b8ecbd1bc27ea6832ec4124b (commit)
      from  3561faa0d119de9b0169f9065cd10d3ac5ed2cdf (commit)

Summary of changes:
 src/plugins/perl/perl_plugin.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 65c35376f94c39d2b8ecbd1bc27ea6832ec4124b
Author: wwp <wwp at free.fr>
Date:   Mon Mar 26 14:01:26 2018 +0200

    Remove key and free attribute value only if they are valid,
    clears CID 1220202.

diff --git a/src/plugins/perl/perl_plugin.c b/src/plugins/perl/perl_plugin.c
index 3d68b8a..9c69566 100644
--- a/src/plugins/perl/perl_plugin.c
+++ b/src/plugins/perl/perl_plugin.c
@@ -430,10 +430,11 @@ static void insert_attribute_hash(gchar *attr)
   if((tl = g_hash_table_lookup(attribute_hash,attr)) != NULL) {
     gpointer origkey;
     gpointer value;
-    g_hash_table_lookup_extended(attribute_hash,attr,&origkey,&value);
-    g_hash_table_remove(attribute_hash,origkey);
-    free_attribute_hash_key(origkey,value,NULL);
-    debug_print("Existing key `%s' freed.\n",attr);
+    if (g_hash_table_lookup_extended(attribute_hash,attr,&origkey,&value)) {
+	  g_hash_table_remove(attribute_hash,origkey);
+      free_attribute_hash_key(origkey,value,NULL);
+      debug_print("Existing key `%s' freed.\n",attr);
+    }
   }
 
   tl = g_new0(PerlPluginTimedSList,1);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list