浏览代码

dialog: free regex struct for rpc dlg.list_match

Daniel-Constantin Mierla 6 年之前
父节点
当前提交
8153309c25
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/modules/dialog/dialog.c

+ 4 - 0
src/modules/dialog/dialog.c

@@ -2588,6 +2588,10 @@ static void rpc_dlg_list_match_ex(rpc_t *rpc, void *c, int with_context)
 			break;
 		}
 	}
+	if(vop == 1) {
+		regfree(&mre);
+	}
+
 	if(m==0) {
 		rpc->fault(c, 404, "Not found");
 		return;