Browse code

rtpengine: free rtpl if error inside fixup_set_id()

Daniel-Constantin Mierla authored on 31/07/2017 13:52:45
Showing 1 changed files
... ...
@@ -1046,6 +1046,7 @@ static int fixup_set_id(void ** param, int param_no)
1046 1046
 		int_val = pv_locate_name(&s);
1047 1047
 		if(int_val<0 || int_val!=s.len) {
1048 1048
 			LM_ERR("invalid parameter %s\n", s.s);
1049
+			pkg_free(rtpl);
1049 1050
 			return -1;
1050 1051
 		}
1051 1052
 		rtpl->rpv = pv_cache_get(&s);