Fixed prevent defect
authorJungYumin <y_m.jung@samsung.com>
Wed, 17 Apr 2013 04:03:13 +0000 (13:03 +0900)
committerJungYumin <y_m.jung@samsung.com>
Wed, 17 Apr 2013 04:03:13 +0000 (13:03 +0900)
Change-Id: Ic8873508a0b7a4f41c3c261d60c55ca39d359c24
Signed-off-by: JungYumin <y_m.jung@samsung.com>
src/FMedia_ImageImpl.cpp

index fa4c8fe..30eba25 100644 (file)
@@ -193,9 +193,9 @@ _ImageImpl::DecodeToBitmapN(const Tizen::Base::ByteBuffer& srcImageBuf, Tizen::G
                        SysTryReturn(NID_MEDIA, pMaskingColor != null, pBmp.release(), E_SUCCESS,
                                "[%s] Could not apply masking color.", GetErrorMessage(r));
                        r = pBmp->SetMaskingColor(pMaskingColor);
+                       delete pMaskingColor;
                        SysTryReturn(NID_MEDIA, r == E_SUCCESS, pBmp.release(), E_SUCCESS,
                                "[%s] Could not set masking color.", GetErrorMessage(r));
-                       delete pMaskingColor;
                }
        }
 
@@ -280,9 +280,9 @@ _ImageImpl::DecodeToBitmapN(const Tizen::Base::ByteBuffer& srcImageBuf, Tizen::G
                        SysTryReturn(NID_MEDIA, pMaskingColor != null, pBmp.release(), E_SUCCESS,
                                "[%s] Could not apply masking color.", GetErrorMessage(r));
                        r = pBmp->SetMaskingColor(pMaskingColor);
+                       delete pMaskingColor;
                        SysTryReturn(NID_MEDIA, r == E_SUCCESS, pBmp.release(), E_SUCCESS,
                                "[%s] Could not set masking color.", GetErrorMessage(r));
-                       delete pMaskingColor;
                }
        }
 
@@ -360,9 +360,9 @@ _ImageImpl::DecodeToBitmapN(const Tizen::Base::ByteBuffer& srcImageBuf, Tizen::G
                        SysTryReturn(NID_MEDIA, pMaskingColor != null, pBmp.release(), E_SUCCESS,
                                "[%s] Could not apply masking color.", GetErrorMessage(r));
                        r = pBmp->SetMaskingColor(pMaskingColor);
+                       delete pMaskingColor;
                        SysTryReturn(NID_MEDIA, r == E_SUCCESS, pBmp.release(), E_SUCCESS,
                                "[%s] Could not set masking color.", GetErrorMessage(r));
-                       delete pMaskingColor;
                }
        }