[epiphany] history-service: Fix leak when clearing all history
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] history-service: Fix leak when clearing all history
- Date: Sun, 19 Feb 2017 15:56:42 +0000 (UTC)
commit d75b14bb914ea2c4fa8177c0479b7f5e0bbef338
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 2b32caa..84fd12a 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -384,6 +384,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]