[epiphany/gnome-3-20] 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-20] history-service: Fix leak when clearing all history
- Date: Sat, 4 Mar 2017 20:07:20 +0000 (UTC)
commit 669c6837522552f4e43d440f936b3c2eeefafa40
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 9ca6359..18b5961 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -377,6 +377,9 @@ ephy_history_service_open_database_connections (EphyHistoryService *self)
g_assert (self->history_thread == g_thread_self ());
+ if (self->history_database != NULL)
+ g_object_unref (self->history_database);
+
self->history_database = ephy_sqlite_connection_new (self->read_only ?
EPHY_SQLITE_CONNECTION_MODE_READ_ONLY
:
EPHY_SQLITE_CONNECTION_MODE_READWRITE);
ephy_sqlite_connection_open (self->history_database, self->history_filename, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]