diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-12-15 13:59:02 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-12-15 14:01:03 +0100 |
commit | 7f6ff09c9fba4011470b1555bdb782ce80925495 (patch) | |
tree | a17450fdd5e12b3d5d40421ea613315141d9d101 /handle.c | |
parent | 6ccd14c700bccf5159efef899a105794b236eede (diff) | |
download | kdbus-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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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) { |