[epiphany/gnome-3-18] history-service: Fix leak when clearing all history
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-18] history-service: Fix leak when clearing all history
- Date: Sat, 4 Mar 2017 20:36:51 +0000 (UTC)
commit 1c66d445295853631cd2329ed80d1d20460bd614
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Feb 18 22:05:21 2017 -0600
history-service: Fix leak when clearing all history
Closing the connection is great, but not enough. We're leaking our
wrapper object.
https://bugzilla.gnome.org/show_bug.cgi?id=778649
lib/history/ephy-history-service.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 5b14a9d..57c27ab 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -411,6 +411,9 @@ ephy_history_service_open_database_connections (EphyHistoryService *self)
g_assert (priv->history_thread == g_thread_self ());
+ if (priv->history_database != NULL)
+ g_object_unref (priv->history_database);
+
priv->history_database = ephy_sqlite_connection_new (priv->read_only ?
EPHY_SQLITE_CONNECTION_MODE_READ_ONLY
:
EPHY_SQLITE_CONNECTION_MODE_READWRITE);
ephy_sqlite_connection_open (priv->history_database, priv->history_filename, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]