[couchdb-glib] Fixes two more small memleaks
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [couchdb-glib] Fixes two more small memleaks
- Date: Fri, 3 Sep 2010 14:35:21 +0000 (UTC)
commit fe13fbb97125a5beb2e2fa908becd6a88d186d01
Author: Krzysztof Klimonda <kklimonda ubuntu com>
Date: Fri Sep 3 16:34:35 2010 +0200
Fixes two more small memleaks
couchdb-glib/couchdb-session.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/couchdb-glib/couchdb-session.c b/couchdb-glib/couchdb-session.c
index 9d38fd7..c995751 100644
--- a/couchdb-glib/couchdb-session.c
+++ b/couchdb-glib/couchdb-session.c
@@ -319,6 +319,7 @@ couchdb_session_get_database_info (CouchdbSession *session, const char *dbname,
}
}
g_object_unref (G_OBJECT (parser));
+ g_free (url);
return result;
}
@@ -343,8 +344,14 @@ couchdb_session_get_database (CouchdbSession *session, const char *dbname, GErro
g_return_val_if_fail (dbname != NULL, NULL);
dbinfo = couchdb_session_get_database_info (session, dbname, error);
- if (dbinfo != NULL)
- return couchdb_database_new (session, dbname);
+ if (dbinfo != NULL) {
+ CouchdbDatabase *db;
+
+ db = couchdb_database_new (session, dbname);
+ couchdb_database_info_unref (dbinfo);
+
+ return db;
+ }
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]