Fix coverity issue 30/214530/1 accepted/tizen/unified/20190925.033552 submit/tizen/20190924.014546
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 24 Sep 2019 01:17:12 +0000 (10:17 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Tue, 24 Sep 2019 01:17:12 +0000 (10:17 +0900)
Change-Id: I020efe153914379277f0a43552978353ac493a59
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
server/thumb-server-internal.c

index 79c2a80..3d97cb4 100755 (executable)
@@ -116,6 +116,11 @@ gboolean _thumb_server_read_socket(GIOChannel *src, GIOCondition condition, gpoi
        int sock = -1;
        int client_sock = -1;
 
+       int buf_size = 0;
+       int send_len = 0;
+       int send_pos = 0;
+       unsigned char *buf = NULL;
+
        memset((void *)&recv_msg, 0, sizeof(recv_msg));
        memset((void *)&res_msg, 0, sizeof(res_msg));
        memset((void *)&credentials, 0, sizeof(credentials));
@@ -163,10 +168,6 @@ gboolean _thumb_server_read_socket(GIOChannel *src, GIOCondition condition, gpoi
        else
                res_msg.dst_path[0] = '\0';
 
-       int buf_size = 0;
-       int send_len = 0;
-       int send_pos = 0;
-       unsigned char *buf = NULL;
        _media_thumb_set_buffer(&res_msg, &buf, &buf_size);
 
        while (buf_size > 0) {