[couchdb-glib] Make sure we free SoupMessage before returning



commit 2a922667f0a4f20fc75519aece6c65cf40a6759b
Author: Krzysztof Klimonda <kklimonda ubuntu com>
Date:   Tue Aug 31 13:55:28 2010 +0200

    Make sure we free SoupMessage before returning

 couchdb-glib/couchdb-session.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/couchdb-glib/couchdb-session.c b/couchdb-glib/couchdb-session.c
index 2f750b1..bb74dc9 100644
--- a/couchdb-glib/couchdb-session.c
+++ b/couchdb-glib/couchdb-session.c
@@ -736,10 +736,14 @@ couchdb_session_send_message (CouchdbSession *session, const char *method, const
 	if (SOUP_STATUS_IS_SUCCESSFUL (status)) {
 		if (output != NULL)
 		       	parse_json_response (session, output, http_message, real_error);
+		g_object_unref (G_OBJECT (http_message));
+
 	       	return TRUE;
 	} else {
 		if (error != NULL)
 			g_set_error (error, COUCHDB_ERROR, status, "%s", http_message->reason_phrase);
+		g_object_unref (G_OBJECT (http_message));
+
 		return FALSE;
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]