[sr-dev] git:5.0:f9092500: sipcapture: free allocated process memory before return

Øyvind Kolbu oyvind.kolbu at usit.uio.no
Wed Oct 25 12:06:41 CEST 2017


Module: kamailio
Branch: 5.0
Commit: f909250081f06c5b9dfd96792cc7960ff00c9f32
URL: https://github.com/kamailio/kamailio/commit/f909250081f06c5b9dfd96792cc7960ff00c9f32

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Øyvind Kolbu <oyvind.kolbu at usit.uio.no>
Date: 2017-10-25T10:50:58+02:00

sipcapture: free allocated process memory before return

(cherry picked from commit ecf1ad77a2b9f69d5ae4f68fdc71cb1b10ebe729)

---

Modified: src/modules/sipcapture/sipcapture.c

---

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

---

diff --git a/src/modules/sipcapture/sipcapture.c b/src/modules/sipcapture/sipcapture.c
index 3e6d28793f..a901236f46 100644
--- a/src/modules/sipcapture/sipcapture.c
+++ b/src/modules/sipcapture/sipcapture.c
@@ -446,6 +446,7 @@ int parse_table_names (str table_name, str ** table_names){
 	names = (str*)pkg_malloc(sizeof(str) * no_tables);
 	if(names == NULL) {
 		LM_ERR("no more pkg memory left\n");
+		pkg_free(table_name_cpy);
 		return -1;
 	}
 	p = strtok (table_name_cpy,"| \t");




More information about the sr-dev mailing list