Browse Source

siputils: free head of params list for get_uri_param()

- GH #3857
Daniel-Constantin Mierla 1 year ago
parent
commit
8363208fff
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/modules/siputils/checks.c

+ 5 - 5
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;
 }