From a0a1f95abfe04d51a52cfb3b9db1e69a9e12c659 Mon Sep 17 00:00:00 2001
From: hajekd <david.hajek@daktela.com>
Date: Sun, 8 Oct 2017 21:05:56 +0200
Subject: [PATCH] res/res_ari.c Fix: Memory leaks in ARI when using
 Content-Type: application/json

ASTERISK-27305
Reported by: David Hajek
Tested by: David Hajek

Change-Id: Ife3e289062e6cf7d0e7d342dbf79ed96feff441e
---
 res/res_ari.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/res/res_ari.c b/res/res_ari.c
index 054d3bf3c5..5145499bef 100644
--- a/res/res_ari.c
+++ b/res/res_ari.c
@@ -884,7 +884,7 @@ static int ast_ari_callback(struct ast_tcptls_session_instance *ser,
 	RAII_VAR(struct ast_variable *, post_vars, NULL, ast_variables_destroy);
 	struct ast_variable *var;
 	const char *app_name = NULL;
-	RAII_VAR(struct ast_json *, body, ast_json_null(), ast_json_free);
+	RAII_VAR(struct ast_json *, body, ast_json_null(), ast_json_unref);
 	int debug_app = 0;
 
 	if (!response_body) {
-- 
GitLab