diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2012-09-06 18:08:47 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-09-07 03:19:58 +0800 |
commit | dddc036986d7fc8da4ce735ffdccf91c2315f6be (patch) | |
tree | c8f608684859c2a551c69a0acfe97359381a4fef /lib | |
parent | c514bd1ee01d6982424e4d5eefb545fc5254a59b (diff) | |
download | gsoc2013-epiphany-dddc036986d7fc8da4ce735ffdccf91c2315f6be.tar gsoc2013-epiphany-dddc036986d7fc8da4ce735ffdccf91c2315f6be.tar.gz gsoc2013-epiphany-dddc036986d7fc8da4ce735ffdccf91c2315f6be.tar.bz2 gsoc2013-epiphany-dddc036986d7fc8da4ce735ffdccf91c2315f6be.tar.lz gsoc2013-epiphany-dddc036986d7fc8da4ce735ffdccf91c2315f6be.tar.xz gsoc2013-epiphany-dddc036986d7fc8da4ce735ffdccf91c2315f6be.tar.zst gsoc2013-epiphany-dddc036986d7fc8da4ce735ffdccf91c2315f6be.zip |
ephy-history-service: remove some dangerous g_object_unref() calls
If there is an error building a statement, the returned value is
always NULL. Calling g_object_unref() on them will lead to trouble.
https://bugzilla.gnome.org/show_bug.cgi?id=683475
Diffstat (limited to 'lib')
-rw-r--r-- | lib/history/ephy-history-service-hosts-table.c | 2 | ||||
-rw-r--r-- | lib/history/ephy-history-service-urls-table.c | 2 | ||||
-rw-r--r-- | lib/history/ephy-history-service-visits-table.c | 2 |
3 files changed, 1 insertions, 5 deletions
diff --git a/lib/history/ephy-history-service-hosts-table.c b/lib/history/ephy-history-service-hosts-table.c index 04be063b0..0a3aa862c 100644 --- a/lib/history/ephy-history-service-hosts-table.c +++ b/lib/history/ephy-history-service-hosts-table.c @@ -300,7 +300,6 @@ ephy_history_service_find_host_rows (EphyHistoryService *self, EphyHistoryQuery if (error) { g_error ("Could not build hosts table query statement: %s", error->message); g_error_free (error); - g_object_unref (statement); return NULL; } if (query->from > 0) { @@ -451,7 +450,6 @@ ephy_history_service_delete_host_row (EphyHistoryService *self, if (error) { g_error ("Could not build urls table query statement: %s", error->message); g_error_free (error); - g_object_unref (statement); return; } diff --git a/lib/history/ephy-history-service-urls-table.c b/lib/history/ephy-history-service-urls-table.c index f0d445150..b37d58fdf 100644 --- a/lib/history/ephy-history-service-urls-table.c +++ b/lib/history/ephy-history-service-urls-table.c @@ -295,7 +295,6 @@ ephy_history_service_find_url_rows (EphyHistoryService *self, EphyHistoryQuery * if (error) { g_error ("Could not build urls table query statement: %s", error->message); g_error_free (error); - g_object_unref (statement); return NULL; } @@ -392,7 +391,6 @@ ephy_history_service_delete_url (EphyHistoryService *self, EphyHistoryURL *url) if (error) { g_error ("Could not build urls table query statement: %s", error->message); g_error_free (error); - g_object_unref (statement); return; } diff --git a/lib/history/ephy-history-service-visits-table.c b/lib/history/ephy-history-service-visits-table.c index 0beaa2325..1b9e5b3d4 100644 --- a/lib/history/ephy-history-service-visits-table.c +++ b/lib/history/ephy-history-service-visits-table.c @@ -155,7 +155,7 @@ ephy_history_service_find_visit_rows (EphyHistoryService *self, EphyHistoryQuery if (error) { g_error ("Could not build visits table query statement: %s", error->message); g_error_free (error); - g_object_unref (statement); + return NULL; } if (query->from >= 0) { |