Module: kamailio
Branch: master
Commit: 86e349463c7d573e9a5e68bd3984ecc95808adb4
URL:
https://github.com/kamailio/kamailio/commit/86e349463c7d573e9a5e68bd3984ecc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-07T09:53:38+02:00
pv: free var in case pkg alloc failure
---
Modified: src/modules/pv/pv_svar.c
---
Diff:
https://github.com/kamailio/kamailio/commit/86e349463c7d573e9a5e68bd3984ecc…
Patch:
https://github.com/kamailio/kamailio/commit/86e349463c7d573e9a5e68bd3984ecc…
---
diff --git a/src/modules/pv/pv_svar.c b/src/modules/pv/pv_svar.c
index d1e638512c..1245cef7f5 100644
--- a/src/modules/pv/pv_svar.c
+++ b/src/modules/pv/pv_svar.c
@@ -66,6 +66,7 @@ script_var_t* add_var(str *name, int vtype)
if(it->name.s==0)
{
+ pkg_free(it);
LM_ERR("out of pkg mem!\n");
return 0;
}