From c514bd1ee01d6982424e4d5eefb545fc5254a59b Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Thu, 6 Sep 2012 13:07:44 +0300 Subject: ephy-history-service: fix a few leaks If there is an error processing the statement, then unref it before returning. https://bugzilla.gnome.org/show_bug.cgi?id=683475 --- lib/history/ephy-history-service-urls-table.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/history/ephy-history-service-urls-table.c') diff --git a/lib/history/ephy-history-service-urls-table.c b/lib/history/ephy-history-service-urls-table.c index fa1539b22..f0d445150 100644 --- a/lib/history/ephy-history-service-urls-table.c +++ b/lib/history/ephy-history-service-urls-table.c @@ -151,6 +151,7 @@ ephy_history_service_add_url_row (EphyHistoryService *self, EphyHistoryURL *url) ephy_sqlite_statement_bind_int (statement, 5, url->host->id, &error) == FALSE) { g_error ("Could not insert URL into urls table: %s", error->message); g_error_free (error); + g_object_unref (statement); return; } @@ -193,6 +194,7 @@ ephy_history_service_update_url_row (EphyHistoryService *self, EphyHistoryURL *u ephy_sqlite_statement_bind_int (statement, 6, url->id, &error) == FALSE) { g_error ("Could not modify URL in urls table: %s", error->message); g_error_free (error); + g_object_unref (statement); return; } -- cgit v1.2.3