]> 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)
committerhajekd <david.hajek@daktela.com>
Sun, 8 Oct 2017 19:05:56 +0000 (21:05 +0200)
ASTERISK-27305
Reported by: David Hajek
Tested by: David Hajek

Change-Id: Ife3e289062e6cf7d0e7d342dbf79ed96feff441e

res/res_ari.c

index 809b7f65a594bd7f2f14b487683876808d2c9cc2..1ac5327358af2afe76e418d4397a7a34456ebc3b 100644 (file)
@@ -883,7 +883,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) {