projects
/
platform
/
core
/
system
/
kdbus-bus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1099550
)
handle: fix potential mem leak when kdbus_conn_kmsg_send() fails
author
Daniel Mack
<zonque@gmail.com>
Fri, 17 Jan 2014 23:02:37 +0000
(
00:02
+0100)
committer
Daniel Mack
<zonque@gmail.com>
Fri, 17 Jan 2014 23:02:37 +0000
(
00:02
+0100)
handle.c
patch
|
blob
|
history
diff --git
a/handle.c
b/handle.c
index c5ef0542404ef87da3b44eb2a65e1a4543022e0e..599fdc6fde7df00a552d24fce300452435035fba 100644
(file)
--- a/
handle.c
+++ b/
handle.c
@@
-609,8
+609,10
@@
static long kdbus_handle_ioctl_ep_connected(struct file *file, unsigned int cmd,
break;
ret = kdbus_conn_kmsg_send(conn->ep, conn, kmsg);
- if (ret < 0)
+ if (ret < 0) {
+ kdbus_kmsg_free(kmsg);
break;
+ }
/* store the offset of the reply back to userspace */
if (kmsg->msg.flags & KDBUS_MSG_FLAGS_SYNC_REPLY) {