[sr-dev] git:master:ecf1ad77: sipcapture: free allocated process memory before return

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 28 10:39:29 CEST 2017


Module: kamailio
Branch: master
Commit: ecf1ad77a2b9f69d5ae4f68fdc71cb1b10ebe729
URL: https://github.com/kamailio/kamailio/commit/ecf1ad77a2b9f69d5ae4f68fdc71cb1b10ebe729

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-07-28T10:39:23+02:00

sipcapture: free allocated process memory before return

---

Modified: src/modules/sipcapture/sipcapture.c

---

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

---

diff --git a/src/modules/sipcapture/sipcapture.c b/src/modules/sipcapture/sipcapture.c
index 0132090dca..8fb9deb16b 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