Module: kamailio
Branch: master
Commit: 8363208fff7c101a2779ff64783e5b7dbf8ffd7c
URL:
https://github.com/kamailio/kamailio/commit/8363208fff7c101a2779ff64783e5b7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-29T10:18:44+02:00
siputils: free head of params list for get_uri_param()
- GH #3857
---
Modified: src/modules/siputils/checks.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8363208fff7c101a2779ff64783e5b7…
Patch:
https://github.com/kamailio/kamailio/commit/8363208fff7c101a2779ff64783e5b7…
---
diff --git a/src/modules/siputils/checks.c b/src/modules/siputils/checks.c
index 4e28aef8e8d..2822e24b7c8 100644
--- a/src/modules/siputils/checks.c
+++ b/src/modules/siputils/checks.c
@@ -1165,7 +1165,7 @@ int get_uri_param(struct sip_msg *_msg, char *_param, char *_value)
pv_value_t val;
param_hooks_t hooks;
- param_t *list = NULL;
+ param_t *plist = NULL;
param_t *params;
param = (str *)_param;
@@ -1178,12 +1178,12 @@ int get_uri_param(struct sip_msg *_msg, char *_param, char
*_value)
t = _msg->parsed_uri.params;
- if(parse_params(&t, CLASS_ANY, &hooks, &list) < 0) {
+ if(parse_params(&t, CLASS_ANY, &hooks, &plist) < 0) {
LM_ERR("ruri parameter parsing failed\n");
return -1;
}
- params = list;
+ params = plist;
while(params) {
if((params->name.len == param->len)
&& (strncmp(params->name.s, param->s, param->len) == 0)) {
@@ -1198,11 +1198,11 @@ int get_uri_param(struct sip_msg *_msg, char *_param, char
*_value)
}
}
- free_params(list);
+ free_params(plist);
return -1;
found:
- free_params(list);
+ free_params(plist);
return 1;
}