... | ... |
@@ -1217,12 +1217,14 @@ int get_ip_and_port_from_uri( struct sip_msg* p_msg , unsigned int *param_ip, un |
1217 | 1217 |
{ |
1218 | 1218 |
LOG(L_ERR, "ERROR: get_ip_and_port_from_uri: " |
1219 | 1219 |
"cannot resolve host\n"); |
1220 |
+ free_uri(&parsed_uri); |
|
1220 | 1221 |
goto error; |
1221 | 1222 |
} |
1222 | 1223 |
memcpy(&ip, nhost->h_addr_list[0], sizeof(unsigned int)); |
1223 | 1224 |
|
1224 | 1225 |
|
1225 | 1226 |
success: |
1227 |
+ free_uri(&parsed_uri); |
|
1226 | 1228 |
*param_ip = ip; |
1227 | 1229 |
*param_port = port; |
1228 | 1230 |
return 0; |