summaryrefslogtreecommitdiff
path: root/handle.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-12-15 13:59:02 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2014-12-15 14:01:03 +0100
commit7f6ff09c9fba4011470b1555bdb782ce80925495 (patch)
treea17450fdd5e12b3d5d40421ea613315141d9d101 /handle.c
parent6ccd14c700bccf5159efef899a105794b236eede (diff)
downloadkdbus-bus-7f6ff09c9fba4011470b1555bdb782ce80925495.tar.gz
kdbus-bus-7f6ff09c9fba4011470b1555bdb782ce80925495.tar.bz2
kdbus-bus-7f6ff09c9fba4011470b1555bdb782ce80925495.zip
handle: fix memleak on failed CMD_SEND
Make sure to free the kmsg if we cannot return the return-flags. Reported-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/handle.c b/handle.c
index 727c8c7a541..47ab69136c1 100644
--- a/handle.c
+++ b/handle.c
@@ -707,10 +707,8 @@ static long handle_ep_ioctl_connected(struct file *file, unsigned int cmd,
if (kdbus_member_set_user(&cmd_send->return_flags, buf,
struct kdbus_cmd_send,
- return_flags)) {
+ return_flags))
ret = -EFAULT;
- break;
- }
/* store the reply back to userspace */
if (cmd_send->flags & KDBUS_SEND_SYNC_REPLY) {