Resolve the prevent issue.
authorSung-jae Park <nicesj.park@samsung.com>
Mon, 6 May 2013 07:27:07 +0000 (16:27 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Mon, 6 May 2013 07:27:29 +0000 (16:27 +0900)
CID 52800

Change-Id: Ia5b6872874cdcb26cd810703bac7b343cb825145

src/com-core_thread.c

index cb93e4c..0b3172b 100644 (file)
@@ -353,13 +353,16 @@ static void *client_cb(void *data)
 
                ret = secure_socket_recv(tcb->handle, chunk->data, chunk->size, &chunk->pid);
                if (ret <= 0) {
+                       int chunk_size;
+
+                       chunk_size = chunk->size;
+
                        destroy_chunk(chunk);
                        if (ret == -EAGAIN) {
-                               DbgPrint("Retry to get data (%d)\n", chunk->size);
+                               DbgPrint("Retry to get data (%d)\n", chunk_size);
                                continue;
                        }
-
-                       DbgPrint("Recv returns: %d (req.size: %d)\n", ret, chunk->size);
+                       DbgPrint("Recv returns: %d (req.size: %d)\n", ret, chunk_size);
                        break;
                }