Procházet zdrojové kódy

outbound: Fix memory leak

- Free parameters parsed when checking for ob markers
Hugh Waite před 11 roky
rodič
revize
3926895973
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. 5 0
      modules/outbound/ob_mod.c

+ 5 - 0
modules/outbound/ob_mod.c

@@ -385,6 +385,8 @@ static int use_outbound_non_reg(struct sip_msg *msg)
 			LM_ERR("parsing Route-URI parameters\n");
 			return 0;
 		}
+		/* Not interested in param body - just the hooks */
+		free_params(params);
 
 		if (hooks.uri.ob)
 		{
@@ -450,6 +452,9 @@ static int use_outbound_non_reg(struct sip_msg *msg)
 			LM_ERR("parsing Contact-URI parameters\n");
 			return 0;
 		}
+		/* Not interested in param body - just the hooks */
+		free_params(params);
+
 		if (hooks.contact.ob)
 		{
 			LM_DBG("found ;ob parameter on Contact-URI - outbound"