]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res/res_ari.c Fix: Memory leaks in ARI when using Content-Type: application/json
authorhajekd <david.hajek@daktela.com>
Sun, 8 Oct 2017 19:05:56 +0000 (21:05 +0200)
committerSean Bright <sean.bright@gmail.com>
Mon, 9 Oct 2017 13:05:09 +0000 (08:05 -0500)
ASTERISK-27305
Reported by: David Hajek
Tested by: David Hajek

Change-Id: Ife3e289062e6cf7d0e7d342dbf79ed96feff441e

res/res_ari.c

index c6fbc6c50b99f791b9235b5c3259b8f83cd84bd3..d99150b7a22badfc9c7150fb35ea55eb13f2bf8a 100644 (file)
@@ -886,7 +886,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) {