Module: kamailio
Branch: master
Commit: 1b610f186f2cab65453f74f58fa0cce9cf944b8b
URL:
https://github.com/kamailio/kamailio/commit/1b610f186f2cab65453f74f58fa0cce…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Jose Luis Verdeguer <pepeluxx(a)gmail.com>
Date: 2018-12-20T10:51:03+01:00
secfilter: fix memmory leak on error
---
Modified: src/modules/secfilter/secfilter_db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1b610f186f2cab65453f74f58fa0cce…
Patch:
https://github.com/kamailio/kamailio/commit/1b610f186f2cab65453f74f58fa0cce…
---
diff --git a/src/modules/secfilter/secfilter_db.c b/src/modules/secfilter/secfilter_db.c
index f6f4665640..274a45757b 100644
--- a/src/modules/secfilter/secfilter_db.c
+++ b/src/modules/secfilter/secfilter_db.c
@@ -211,6 +211,7 @@ int append_rule(int action, int type, str *value)
new = shm_append_str_list(v, value->len, last_node, &total);
if(!new) {
LM_ERR("can't append new node\n");
+ shm_free(v);
return -1;
}
LM_DBG("new node[%p] str:'%.*s'[%d]\n", new, new->s.len,
new->s.s,