Module: kamailio
Branch: 5.0
Commit: 9d01636609a7cb7d187ade97953fa6e49f62413d
URL:
https://github.com/kamailio/kamailio/commit/9d01636609a7cb7d187ade97953fa6e…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com>
Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com>
Date: 2018-01-04T09:26:44+01:00
erlang: fix bad free
Avoid to free non-pointer, likely causing a crash later.
(cherry picked from commit 3680a1a6ec6971e79deb76daafc89cf2fe206c60)
---
Modified: src/modules/erlang/erlang_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9d01636609a7cb7d187ade97953fa6e…
Patch:
https://github.com/kamailio/kamailio/commit/9d01636609a7cb7d187ade97953fa6e…
---
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;
}