aboutsummaryrefslogtreecommitdiffstats
path: root/lib/history/ephy-history-service-urls-table.c
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-09-06 18:07:44 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-09-07 03:19:58 +0800
commitc514bd1ee01d6982424e4d5eefb545fc5254a59b (patch)
tree8aeee0565d4f417617d759fdcd5ba48db3ce78d9 /lib/history/ephy-history-service-urls-table.c
parent697dfbede122fb3e5c1847c77a7f24bc6b1bf3c5 (diff)
downloadgsoc2013-epiphany-c514bd1ee01d6982424e4d5eefb545fc5254a59b.tar
gsoc2013-epiphany-c514bd1ee01d6982424e4d5eefb545fc5254a59b.tar.gz
gsoc2013-epiphany-c514bd1ee01d6982424e4d5eefb545fc5254a59b.tar.bz2
gsoc2013-epiphany-c514bd1ee01d6982424e4d5eefb545fc5254a59b.tar.lz
gsoc2013-epiphany-c514bd1ee01d6982424e4d5eefb545fc5254a59b.tar.xz
gsoc2013-epiphany-c514bd1ee01d6982424e4d5eefb545fc5254a59b.tar.zst
gsoc2013-epiphany-c514bd1ee01d6982424e4d5eefb545fc5254a59b.zip
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
Diffstat (limited to 'lib/history/ephy-history-service-urls-table.c')
-rw-r--r--lib/history/ephy-history-service-urls-table.c2
1 files changed, 2 insertions, 0 deletions
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;
}