diff options
author | Haejeong Kim <backto.kim@samsung.com> | 2017-09-06 14:01:06 +0900 |
---|---|---|
committer | Haejeong Kim <backto.kim@samsung.com> | 2017-09-06 14:01:06 +0900 |
commit | f621258d843be4b8ced15372dbfd088ecfa9949b (patch) | |
tree | 50e2490f26019740b5b0245b551bb8731195b9b5 | |
parent | 9bba570109967f1cc96acf53beef04ad34f2aaac (diff) | |
download | libmedia-thumbnail-f621258d843be4b8ced15372dbfd088ecfa9949b.tar.gz libmedia-thumbnail-f621258d843be4b8ced15372dbfd088ecfa9949b.tar.bz2 libmedia-thumbnail-f621258d843be4b8ced15372dbfd088ecfa9949b.zip |
Change free to SAFE_FREEsubmit/tizen/20170906.051057accepted/tizen/unified/20170907.060441
Change-Id: Ia773b6de6f99a382a48221992b5d326dbec2e9cb
-rwxr-xr-x | src/codec/img-codec.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/codec/img-codec.c b/src/codec/img-codec.c index e87e93f..bebe05b 100755 --- a/src/codec/img-codec.c +++ b/src/codec/img-codec.c @@ -20,6 +20,7 @@ */ #include "media-thumb-debug.h" +#include "media-thumb-util.h" #include "img-codec.h" #include <string.h> #include <image_util.h> @@ -48,7 +49,7 @@ unsigned int *ImgGetFirstFrameAGIFAtSize(const char *szFileName, if (ImgConvertRGB565ToRGB888(pFrameInfo->pOutBits, &pDecodedRGB888Buf, pFrameInfo->width, pFrameInfo->height)) { if (pDecodedRGB888Buf) { - free(pFrameInfo->pOutBits); + SAFE_FREE(pFrameInfo->pOutBits); pFrameInfo->pOutBits = pDecodedRGB888Buf; unsigned char *src = ((unsigned char *)(pFrameInfo->pOutBits)); @@ -172,11 +173,7 @@ AGifFrameInfo *ImgCreateAGIFFrame(const char *szFileName, unsigned int width, un if (DrmReadFile(hFile, pEncodedData, mem_alloc_size, &size) == FALSE) { thumb_err("DrmReadFile was failed"); DrmCloseFile(hFile); - - if (pEncodedData) { - free(pEncodedData); - pEncodedData = NULL; - } + SAFE_FREE(pEncodedData); return NULL; } |