[sr-dev] git:4.2:53dbdd38: sipcapture: fix not to access freed pointer during shut down

Daniel-Constantin Mierla miconda at gmail.com
Tue May 19 09:36:50 CEST 2015


Module: kamailio
Branch: 4.2
Commit: 53dbdd384670e384c714739224e3c38366a23b3f
URL: https://github.com/kamailio/kamailio/commit/53dbdd384670e384c714739224e3c38366a23b3f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-05-19T09:35:48+02:00

sipcapture: fix not to access freed pointer during shut down

(cherry picked from commit 1db6fdf41dbb4b6c95e0f86dfebc4c793858d8b5)

---

Modified: modules/sipcapture/sipcapture.c

---

Diff:  https://github.com/kamailio/kamailio/commit/53dbdd384670e384c714739224e3c38366a23b3f.diff
Patch: https://github.com/kamailio/kamailio/commit/53dbdd384670e384c714739224e3c38366a23b3f.patch

---

diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 070482c..804436e 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -1028,7 +1028,7 @@ static void destroy(void)
 	c = capture_modes_root;
 
 	while (c){
-		c0 = c;
+		c0 = c->next;
 		if (c->name.s){
 			pkg_free(c->name.s);
 		}
@@ -1043,7 +1043,7 @@ static void destroy(void)
 		}
 
 		pkg_free(c);
-		c = c0->next;
+		c = c0;
 	}
 
 	if (capture_on_flag)




More information about the sr-dev mailing list