Parcourir la source

ims_ipsec_pcscf: jump to error for clean up

(cherry picked from commit f0291728b7fb623faf1d4de0f3152e782a6782ae)
Daniel-Constantin Mierla il y a 3 mois
Parent
commit
ac74e0fae0
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/modules/ims_ipsec_pcscf/cmd.c

+ 1 - 1
src/modules/ims_ipsec_pcscf/cmd.c

@@ -272,7 +272,7 @@ static int fill_contact(
 
 				if((srcip = pkg_malloc(50)) == NULL) {
 					LM_ERR("Error allocating memory for source IP address\n");
-					return -1;
+					goto error;
 				}
 
 				memcpy(srcip, alias_s.s, ci->received_host.len);