summaryrefslogtreecommitdiff
path: root/res/ari/resource_channels.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2014-01-12 22:24:27 +0000
committerJoshua Colp <jcolp@digium.com>2014-01-12 22:24:27 +0000
commit8585340b8768562bbffc0cfe51b7a59f197cd8a0 (patch)
treecabf6d29832d0606f66729ff84b4e5741cf24d6f /res/ari/resource_channels.c
parent373965dbff734b96132f61741838d6797c4a1876 (diff)
res_ari: Fix various memory leaks.
This change fixes a few memory leaks that were found based on a mailing list post. 1. Some JSON response messages were never freed. This was caused by the documentation stating that message references were stolen when in reality they were not. The code now follows the documentation and usage has been updated. 2. HTTP response headers were never freed. 3. The variable list for wildcards paths was never freed. (closes issue ASTERISK-23128) Reported by: Kenneth Watson (on list) Review: https://reviewboard.asterisk.org/r/3119/ ........ Merged revisions 405325 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ari/resource_channels.c')
-rw-r--r--res/ari/resource_channels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index c6900f1b2..e6322a37c 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -362,7 +362,7 @@ void ast_ari_channels_play(struct ast_variable *headers,
RAII_VAR(struct ast_channel_snapshot *, snapshot, NULL, ao2_cleanup);
RAII_VAR(struct stasis_app_playback *, playback, NULL, ao2_cleanup);
RAII_VAR(char *, playback_url, NULL, ast_free);
- RAII_VAR(struct ast_json *, json, NULL, ast_json_unref);
+ struct ast_json *json;
const char *language;
ast_assert(response != NULL);
@@ -434,7 +434,7 @@ void ast_ari_channels_record(struct ast_variable *headers,
RAII_VAR(struct ast_channel_snapshot *, snapshot, NULL, ao2_cleanup);
RAII_VAR(struct stasis_app_recording *, recording, NULL, ao2_cleanup);
RAII_VAR(char *, recording_url, NULL, ast_free);
- RAII_VAR(struct ast_json *, json, NULL, ast_json_unref);
+ struct ast_json *json;
RAII_VAR(struct stasis_app_recording_options *, options, NULL,
ao2_cleanup);
RAII_VAR(char *, uri_encoded_name, NULL, ast_free);