Fixed memory leaks
[apps/osp/Gallery.git] / src / GlThumbnailProvider.cpp
index 89061c7..cb2a68e 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
@@ -329,7 +329,10 @@ ThumbnailProvider::GetThumbnailInfoN(const ContentId& contentId) const
                        String path = pContentInfo->GetContentPath();
                        if (path.EndsWith(L"tif") != true
                                && path.EndsWith(L"tiff") != true
-                               && path.EndsWith(L"wbmp") != true)
+                               && path.EndsWith(L"wbmp") != true
+                               && path.EndsWith(L"TIF") != true
+                               && path.EndsWith(L"TIFF") != true
+                               && path.EndsWith(L"WBMP") != true)
                        {
                                pBitmap = pContentInfo->GetThumbnailN();
                        }
@@ -355,6 +358,7 @@ ThumbnailProvider::GetThumbnailInfoN(const ContentId& contentId) const
                        pNewThumbnailInfo = new (std::nothrow) ThumbnailInfo();
                        pNewThumbnailInfo->Construct(contentId, pContentInfo->GetContentPath(), *pBitmap, contentType, duration);
                        delete pBitmap;
+                       delete pContentInfo;
                }
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));