diff options
author | Sung-jae Park <nicesj.park@samsung.com> | 2013-05-06 16:14:09 +0900 |
---|---|---|
committer | Sung-jae Park <nicesj.park@samsung.com> | 2013-05-06 16:14:09 +0900 |
commit | 4cca7740ccbcb118c757dbd409713d2359eae128 (patch) | |
tree | 1a6dd74f877c59a875e4a9369eb814d657713c59 | |
parent | 6ef92eaff2f64d7c86a17888786fe7c2cdce7236 (diff) | |
download | com-core-tizen_2.1.tar.gz com-core-tizen_2.1.tar.bz2 com-core-tizen_2.1.zip |
Fix the accessing released memory bug.submit/tizen_2.1/20130514.052908submit/tizen/20130517.044807accepted/tizen/20130520.100914tizen_2.1
Change-Id: I906f8e9a363f719d50c9204fd29363ca0a0a63ad
-rw-r--r-- | src/com-core_thread.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com-core_thread.c b/src/com-core_thread.c index cb93e4c..0b3172b 100644 --- a/src/com-core_thread.c +++ b/src/com-core_thread.c @@ -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; } |