From d8d5f2138197dbb359a426e2492b23efb89c77c9 Mon Sep 17 00:00:00 2001 From: Hyunbin Lee Date: Wed, 10 Apr 2013 20:15:22 +0900 Subject: [PATCH] Remove memory leak Change-Id: I49a822e4ef56bd518c963e5cf15755ff8d952716 Signed-off-by: Hyunbin Lee --- src/io/FIo_RegistryCore.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/io/FIo_RegistryCore.cpp b/src/io/FIo_RegistryCore.cpp index 5ca9166..4581a51 100644 --- a/src/io/FIo_RegistryCore.cpp +++ b/src/io/FIo_RegistryCore.cpp @@ -1321,7 +1321,6 @@ _RegistryCore::GetEntryValue(int sectionIndex, int entryIndex, _RegValueType typ { _RegistrySection* pRegSection = null; _RegistryEntry* pRegEntry = null; - IEnumerator* pEntryEnum = null; result r = E_SUCCESS; int listSize = 0; int tmpEntryIndex = -1; @@ -1351,7 +1350,7 @@ _RegistryCore::GetEntryValue(int sectionIndex, int entryIndex, _RegValueType typ SysTryReturnVoidResult(NID_IO, entryIndex < entryListSize, E_KEY_NOT_FOUND, "[E_KEY_NOT_FOUND]Entry not found."); // read the entries for this section - pEntryEnum = pRegSection->__entryList.GetEnumeratorN(); + unique_ptr< IEnumerator > pEntryEnum(pRegSection->__entryList.GetEnumeratorN()); SysTryReturnVoidResult(NID_IO, pEntryEnum != null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND]Entry list is empty."); tmpEntryIndex = entryIndex; -- 2.7.4