Module: kamailio
Branch: master
Commit: 3680a1a6ec6971e79deb76daafc89cf2fe206c60
URL:
https://github.com/kamailio/kamailio/commit/3680a1a6ec6971e79deb76daafc89cf…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com>
Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com>
Date: 2018-01-03T23:21:41+01:00
erlang: fix bad free
Avoid to free non-pointer, likely causing a crash later.
---
Modified: src/modules/erlang/erlang_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3680a1a6ec6971e79deb76daafc89cf…
Patch:
https://github.com/kamailio/kamailio/commit/3680a1a6ec6971e79deb76daafc89cf…
---
diff --git a/src/modules/erlang/erlang_mod.c b/src/modules/erlang/erlang_mod.c
index 1c3c12efeb..54d2fa1733 100644
--- a/src/modules/erlang/erlang_mod.c
+++ b/src/modules/erlang/erlang_mod.c
@@ -697,7 +697,6 @@ static int fixup_rpc(void** param, int param_no)
if (psp->setf != pv_list_set && psp->setf != pv_xbuff_set) {
LM_ERR("wrong parameter #%d: accepted types are list or
xbuff\n",param_no);
- pv_spec_free(&erl_param->value.sp);
pkg_free((void*)erl_param);
return E_UNSPEC;
}
@@ -916,7 +915,6 @@ static int fixup_reg(void** param, int param_no)
erl_param->type = ERL_PARAM_XBUFF_SPEC;
} else {
LM_ERR("wrong parameter #%d\n",param_no);
- pv_spec_free(&erl_param->value.sp);
pkg_free((void*)erl_param);
return E_UNSPEC;
}
@@ -1111,7 +1109,6 @@ static int fixup_reply(void** param, int param_no)
erl_param->type = ERL_PARAM_XBUFF_SPEC;
} else {
LM_ERR("wrong parameter #%d\n",param_no);
- pv_spec_free(&erl_param->value.sp);
pkg_free((void*)erl_param);
return E_UNSPEC;
}
@@ -1376,7 +1373,6 @@ static int fixup_send(void** param, int param_no)
erl_param->type = ERL_PARAM_XBUFF_SPEC;
} else {
LM_ERR("wrong parameter #%d\n",param_no);
- pv_spec_free(&erl_param->value.sp);
pkg_free((void*)erl_param);
return E_UNSPEC;
}