projects
/
platform
/
core
/
system
/
swap-manager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e2cd58
)
Memory leak in error branch
18/16018/2
author
Dmitry Bogatov
<d.bogatov@samsung.com>
Fri, 31 Jan 2014 07:32:42 +0000
(11:32 +0400)
committer
Dmitry Kovalenko
<d.kovalenko@samsung.com>
Thu, 27 Mar 2014 05:16:59 +0000
(22:16 -0700)
Change-Id: I9df22010dc8498fa522a2b6b32a61fdf40117b8e
Signed-off-by: Dmitry Bogatov <d.bogatov@samsung.com>
daemon/daemon.c
patch
|
blob
|
history
diff --git
a/daemon/daemon.c
b/daemon/daemon.c
index
7da1871
..
af1490c
100644
(file)
--- a/
daemon/daemon.c
+++ b/
daemon/daemon.c
@@
-729,8
+729,10
@@
static int controlSocketHandler(int efd)
// Receive payload (if exists)
recv_len = recv(manager.host.control_socket,
msg->payload, msg->len, MSG_WAITALL);
- if (recv_len == -1)
+ if (recv_len == -1) {
+ free(msg);
return -11;
+ }
}
printBuf((char *)msg, MSG_CMD_HDR_LEN + msg->len);
res = host_message_handler(msg);