Forráskód Böngészése

core: parse_ppi_pai - free header parameters for PAI and PPI

- they are not considere in the compacted p_id_body_t and not freed
- specs don't mention headers parameters for PAI and PPI, but could come
  as UA extensions

(cherry picked from commit c1b4d442501591bd18e8130474eeb5c16101e549)
Daniel-Constantin Mierla 10 éve
szülő
commit
38d6c0bc62
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      parser/parse_ppi_pai.c

+ 4 - 0
parser/parse_ppi_pai.c

@@ -62,6 +62,8 @@ int parse_pai_ppi_body(char *buf, int len, p_id_body_t **body)
 		LM_ERR("Error parsing PAI/PPI body %u '%.*s'\n", num_uri, len, buf);
 		return -1;
 	}
+	/* should be no header params, but in case there are, free them */
+	free_to_params(&uri_b[num_uri]);
 	num_uri++;
 	while ((*tmp == ',') && (num_uri < NUM_PAI_BODIES))
 	{
@@ -72,6 +74,8 @@ int parse_pai_ppi_body(char *buf, int len, p_id_body_t **body)
 			LM_ERR("Error parsing PAI/PPI body %u '%.*s'\n", num_uri, len, buf);
 			return -1;
 		}
+		/* should be no header params, but in case there are, free them */
+		free_to_params(&uri_b[num_uri]);
 		num_uri++;
 	}
 	if (num_uri >= NUM_PAI_BODIES)