瀏覽代碼

sipcapture: free allocated process memory before return

(cherry picked from commit ecf1ad77a2b9f69d5ae4f68fdc71cb1b10ebe729)
Mikko Lehto 8 年之前
父節點
當前提交
f909250081
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/modules/sipcapture/sipcapture.c

+ 1 - 0
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");