summaryrefslogtreecommitdiff
path: root/include/asterisk
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 /include/asterisk
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 'include/asterisk')
-rw-r--r--include/asterisk/ari.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/asterisk/ari.h b/include/asterisk/ari.h
index f5b76f8dc..00769eea5 100644
--- a/include/asterisk/ari.h
+++ b/include/asterisk/ari.h
@@ -214,7 +214,7 @@ __attribute__((format(printf, 4, 5)));
* \brief Fill in an \c OK (200) \a ast_ari_response.
* \param response Response to fill in.
* \param message JSON response. This reference is stolen, so just \ref
- * ast_json_incref if you need to keep a reference to it.
+ * ast_json_ref if you need to keep a reference to it.
*/
void ast_ari_response_ok(struct ast_ari_response *response,
struct ast_json *message);
@@ -226,6 +226,10 @@ void ast_ari_response_no_content(struct ast_ari_response *response);
/*!
* \brief Fill in a <tt>Created</tt> (201) \a ast_ari_response.
+ * \param response Response to fill in.
+ * \param url URL to the created resource.
+ * \param message JSON response. This reference is stolen, so just \ref
+ * ast_json_ref if you need to keep a reference to it.
*/
void ast_ari_response_created(struct ast_ari_response *response,
const char *url, struct ast_json *message);