[Pkg-voip-commits] r9566 - in /kamailio/trunk/debian/patches: series upstream/0003-regex_mod-Fix-a-double-freeing-in-free_shared_memory.patch

maniac-guest at alioth.debian.org maniac-guest at alioth.debian.org
Wed Feb 29 10:55:05 UTC 2012


Author: maniac-guest
Date: Wed Feb 29 10:55:04 2012
New Revision: 9566

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=9566
Log:
upstream bugfix

Added:
    kamailio/trunk/debian/patches/upstream/0003-regex_mod-Fix-a-double-freeing-in-free_shared_memory.patch
Modified:
    kamailio/trunk/debian/patches/series

Modified: kamailio/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/series?rev=9566&op=diff
==============================================================================
--- kamailio/trunk/debian/patches/series (original)
+++ kamailio/trunk/debian/patches/series Wed Feb 29 10:55:04 2012
@@ -1,5 +1,6 @@
 upstream/0001-Proper-parsing-for-PVs.patch
 upstream/0002-xmlops-fixed-internal-module-name.patch
+upstream/0003-regex_mod-Fix-a-double-freeing-in-free_shared_memory.patch
 no_lib64_on_64_bits.patch
 no_INSTALL_file.patch
 spelling-errors.patch

Added: kamailio/trunk/debian/patches/upstream/0003-regex_mod-Fix-a-double-freeing-in-free_shared_memory.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0003-regex_mod-Fix-a-double-freeing-in-free_shared_memory.patch?rev=9566&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0003-regex_mod-Fix-a-double-freeing-in-free_shared_memory.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0003-regex_mod-Fix-a-double-freeing-in-free_shared_memory.patch Wed Feb 29 10:55:04 2012
@@ -1,0 +1,87 @@
+From 7f2e9173caf0da18bbd2fbad76f855c6bf5703bf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= <ibc at aliax.net>
+Date: Tue, 28 Feb 2012 20:26:18 +0100
+Subject: [PATCH] [regex_mod] Fix a double freeing in free_shared_memory() function.
+
+---
+ modules_k/regex/regex_mod.c |   18 ++++++++++--------
+ 1 files changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/modules_k/regex/regex_mod.c b/modules_k/regex/regex_mod.c
+index bb0241b..d5b2ab0 100644
+--- a/modules_k/regex/regex_mod.c
++++ b/modules_k/regex/regex_mod.c
+@@ -177,8 +177,6 @@ struct module_exports exports = {
+  */
+ static int mod_init(void)
+ {
+-	LM_INFO("initializing module...\n");
+-	
+ 	if(register_mi_mod(exports.name, mi_cmds)!=0)
+ 	{
+ 		LM_ERR("failed to register MI commands\n");
+@@ -233,9 +231,9 @@ static int mod_init(void)
+ 		}
+ 		
+ 		/* Load the pcres */
+-		LM_NOTICE("loading pcres...\n");
++		LM_DBG("loading pcres...\n");
+ 		if (load_pcres(START)) {
+-			LM_CRIT("failed to load pcres\n");
++			LM_ERR("failed to load pcres\n");
+ 			goto err;
+ 		}
+ 	}
+@@ -384,9 +382,9 @@ static int load_pcres(int action)
+ 	}
+ 	
+ 	/* Log the group patterns */
+-	LM_NOTICE("num groups = %d\n", num_pcres_tmp);
++	LM_INFO("num groups = %d\n", num_pcres_tmp);
+ 	for (i=0; i < num_pcres_tmp; i++) {
+-		LM_NOTICE("<group[%d]>%s</group[%d]> (size = %i)\n", i, patterns[i], i, (int)strlen(patterns[i]));
++		LM_INFO("<group[%d]>%s</group[%d]> (size = %i)\n", i, patterns[i], i, (int)strlen(patterns[i]));
+ 	}
+ 	
+ 	/* Temporal pointer of pcres */
+@@ -498,19 +496,23 @@ static void free_shared_memory(void)
+ 			}
+ 		}
+ 		shm_free(pcres);
++		pcres = NULL;
+ 	}
+ 	
+ 	if (num_pcres) {
+ 		shm_free(num_pcres);
++		num_pcres = NULL;
+ 	}
+ 	
+ 	if (pcres_addr) {
+ 		shm_free(pcres_addr);
++		pcres_addr = NULL;
+ 	}
+ 	
+ 	if (reload_lock) {
+ 		lock_destroy(reload_lock);
+ 		lock_dealloc(reload_lock);
++		reload_lock = NULL;
+     }
+ }
+ 
+@@ -672,11 +674,11 @@ static struct mi_root* mi_pcres_reload(struct mi_root* cmd, void* param)
+ 		return init_mi_tree(403, MI_SSTR("Group matching not enabled"));
+ 	}
+ 	
+-	LM_NOTICE("reloading pcres...\n");
++	LM_INFO("reloading pcres...\n");
+ 	if (load_pcres(RELOAD)) {
+ 		LM_ERR("failed to reload pcres\n");
+ 		return init_mi_tree(500, MI_INTERNAL_ERR_S, MI_INTERNAL_ERR_LEN);
+ 	}
+-	LM_NOTICE("reload success\n");
++	LM_INFO("reload success\n");
+ 	return init_mi_tree(200, MI_OK_S, MI_OK_LEN);
+ }
+-- 
+1.7.4.1
+




More information about the Pkg-voip-commits mailing list