From 7c05271d35efca1734035ff987ea36685b2f87be Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Tue, 28 Feb 2012 12:35:08 -0500
Subject: [PATCH] * #8968: history: fix memory leak upon exception

---
 daemon/src/managerimpl.cpp | 1 -
 daemon/src/managerimpl.h   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp
index 96d6aa5e99..6f07eb0b87 100644
--- a/daemon/src/managerimpl.cpp
+++ b/daemon/src/managerimpl.cpp
@@ -87,7 +87,6 @@ ManagerImpl::ManagerImpl() :
 ManagerImpl::~ManagerImpl()
 {
     delete imModule_;
-    delete history_;
     delete audiofile_;
 }
 
diff --git a/daemon/src/managerimpl.h b/daemon/src/managerimpl.h
index b1ff382644..5ba79afd4d 100644
--- a/daemon/src/managerimpl.h
+++ b/daemon/src/managerimpl.h
@@ -1150,7 +1150,7 @@ class ManagerImpl {
           * To handle the persistent history
           * TODO: move this to ConfigurationManager
           */
-        History *history_;
+        std::auto_ptr<History> history_;
 
         /**
          * Instant messaging module, resposible to initiate, format, parse,
-- 
GitLab