Fix mismatched free issue
authorGongwook Lee <gongwook78.lee@samsung.com>
Mon, 22 Apr 2013 12:30:38 +0000 (21:30 +0900)
committerGongwook Lee <gongwook78.lee@samsung.com>
Mon, 22 Apr 2013 12:30:38 +0000 (21:30 +0900)
Change-Id: Icb3176b7d192636382b9ecf6f4011bcc0e98709b
Signed-off-by: Gongwook Lee <gongwook78.lee@samsung.com>
src/FUixVision_FaceRecognizerImpl.cpp

index b2f56c9..b65a6c1 100644 (file)
@@ -668,7 +668,7 @@ _FaceRecognizerImpl::DetectBlinksFromBitmapN(const Tizen::Base::ByteBuffer& byte
        pDetectList(new (std::nothrow) HashMapT< Tizen::Graphics::Rectangle, EyeState >);
        SysTryReturn(NID_UIX, pDetectList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
-       std::unique_ptr< unsigned char > pBuffer(new (std::nothrow) unsigned char[resolution.width * resolution.height]);
+       std::unique_ptr< unsigned char[] > pBuffer(new (std::nothrow) unsigned char[resolution.width * resolution.height]);
        SysTryCatch(NID_UIX, pBuffer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
        pImageBuffer = pBuffer.get();
@@ -776,7 +776,7 @@ _FaceRecognizerImpl::RecognizeExpressionsFromBitmapN(const Tizen::Base::ByteBuff
        pDetectList(new (std::nothrow) HashMapT< Tizen::Graphics::Rectangle, FacialExpression >);
        SysTryReturn(NID_UIX, pDetectList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
-       std::unique_ptr< unsigned char > pBuffer(new (std::nothrow) unsigned char[resolution.width * resolution.height]);
+       std::unique_ptr< unsigned char[] > pBuffer(new (std::nothrow) unsigned char[resolution.width * resolution.height]);
        SysTryCatch(NID_UIX, pBuffer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
        pImageBuffer = pBuffer.get();
        SysTryCatch(NID_UIX, pImageBuffer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Failed to create the Buffer.",