From 30aa3d7059305c2cd2d3b5f2b8584bc5b9eb843e Mon Sep 17 00:00:00 2001 From: Doug Bailey Date: Fri, 18 Apr 2008 16:05:29 +0000 Subject: [PATCH] Add g__object_unref to clean up gmime message object git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114253 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_http_post.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/res/res_http_post.c b/res/res_http_post.c index bcf2e0dbdc..d065365fd8 100644 --- a/res/res_http_post.c +++ b/res/res_http_post.c @@ -245,12 +245,14 @@ static struct ast_str *http_post_callback(struct ast_tcptls_session_instance *se if (!(message_count = process_message(message, post_dir->str))) { ast_log(LOG_ERROR, "Invalid MIME data, found no parts!\n"); - + g_object_unref(message); return ast_http_error((*status = 400), (*title = ast_strdup("Bad Request")), NULL, "The was an error parsing the request."); } + g_object_unref(message); + return ast_http_error((*status = 200), (*title = ast_strdup("OK")), NULL, "File successfully uploaded.");