浏览代码

outbound: Fix memory leak

- Free parameters parsed when checking for ob markers
Hugh Waite 11 年之前
父节点
当前提交
3926895973
共有 1 个文件被更改,包括 5 次插入0 次删除
  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"