Fixed to leak of memory
authorahram.suh <ahram.suh@samsung.com>
Thu, 16 May 2013 05:26:25 +0000 (14:26 +0900)
committerahram.suh <ahram.suh@samsung.com>
Thu, 16 May 2013 05:26:25 +0000 (14:26 +0900)
Change-Id: I288615bc51426bc1086ffb8670ab8fb394a4313b

src/IntHistoryPresentationModel.cpp

index a325f4c..eb2c369 100644 (file)
@@ -726,6 +726,8 @@ HistoryPresentationModel::GetHistoryCountWithTimeRange(Tizen::Base::DateTime& st
                        r = GetHistory(0, count, *__pDataList);
                        if (IsFailed(r))
                        {
+                               delete __pDataList;
+                               __pDataList = null;
                                return r;
                        }
                }
@@ -1053,6 +1055,8 @@ HistoryPresentationModel::GetHistoryWithTimeRange(Tizen::Base::DateTime& startTi
                        r = GetHistory(0, count, *__pDataList);
                        if(IsFailed(r))
                        {
+                               delete __pDataList;
+                               __pDataList = null;
                                return r;
                        }
                }