summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhj kim <backto.kim@samsung.com>2018-03-19 17:59:50 +0900
committerJiyong Min <jiyong.min@samsung.com>2018-03-20 01:56:28 +0000
commit700b579baebddbbbfc0bc313acd54ef2368244c6 (patch)
tree261ee2fe7d9032a8be5cf9c9513597996137aef8
parent8cb7f2de072c591c67209664343be5c42778127d (diff)
downloadlibmedia-thumbnail-700b579baebddbbbfc0bc313acd54ef2368244c6.tar.gz
libmedia-thumbnail-700b579baebddbbbfc0bc313acd54ef2368244c6.tar.bz2
libmedia-thumbnail-700b579baebddbbbfc0bc313acd54ef2368244c6.zip
Change-Id: I890d8fae5854f0ee47a563034805999e3eec5486
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index fc11e28..917aa6a 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -265,18 +265,19 @@ int _media_thumb_recv_msg(int sock, int header_size, thumbMsg *msg)
if (strlen(msg->org_path) == 0 || strlen(msg->org_path) >= MAX_FILEPATH_LEN) {
thumb_err("org_path size is invalid %d", strlen(msg->org_path));
-
+ SAFE_FREE(buf);
return MS_MEDIA_ERR_SOCKET_RECEIVE;
}
/* it can be empty string */
if (strlen(msg->dst_path) >= MAX_FILEPATH_LEN) {
thumb_err("dst_path size is invalid %d", strlen(msg->dst_path));
-
+ SAFE_FREE(buf);
return MS_MEDIA_ERR_SOCKET_RECEIVE;
}
SAFE_FREE(buf);
+
if (msg->thumb_size < 0) {
thumb_err("recv data is wrong");
return MS_MEDIA_ERR_SOCKET_RECEIVE;