Explorar o código

dialog: free regex struct for rpc dlg.list_match

Daniel-Constantin Mierla %!s(int64=6) %!d(string=hai) anos
pai
achega
8153309c25
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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;