Module: kamailio
Branch: master
Commit: f624e1701088a94465a06f36a2ef27804b16ec0e
URL:
https://github.com/kamailio/kamailio/commit/f624e1701088a94465a06f36a2ef278…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-08T14:57:52+02:00
core: parser - free unlinked local param structure in parse_to_param()
---
Modified: src/core/parser/parse_addr_spec.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f624e1701088a94465a06f36a2ef278…
Patch:
https://github.com/kamailio/kamailio/commit/f624e1701088a94465a06f36a2ef278…
---
diff --git a/src/core/parser/parse_addr_spec.c b/src/core/parser/parse_addr_spec.c
index 604791c7b0..0b8cddc8e2 100644
--- a/src/core/parser/parse_addr_spec.c
+++ b/src/core/parser/parse_addr_spec.c
@@ -281,6 +281,10 @@ static char *parse_to_param(char *const buffer, const char *const
end,
semicolon_add_param:
add_param(param, to_b, newparam);
case E_PARA_VALUE:
+ if(newparam) {
+ pkg_free(newparam);
+ newparam = NULL;
+ }
param = (struct to_param *)pkg_malloc(
sizeof(struct to_param));
if(!param) {