Browse Source

outbound: Fix memory leak

- Free parameters parsed when checking for ob markers
Hugh Waite 11 years ago
parent
commit
3926895973
1 changed files with 5 additions and 0 deletions
  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"