lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAN+gG=Fy4ixGRXJSF3bXCGWTYxMiVuO7xbNAQzx_pjUoyhGbVA@mail.gmail.com>
Date:	Tue, 20 Nov 2012 17:34:04 +0100
From:	Benjamin Tissoires <benjamin.tissoires@...il.com>
To:	Jiri Kosina <jkosina@...e.cz>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: i2c-hid: fix memory leak during probe

On Tue, Nov 20, 2012 at 5:09 PM, Jiri Kosina <jkosina@...e.cz> wrote:
> In case we are returning from i2c_hid_probe() through the 'err' or
> err_mem_free labels, there is noone freeing the buffers allocated by
> i2c_hid_alloc_buffers().

ouch... thanks Jiri
I hope there are not so much others like this one :)

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@...il.com>

>
> Signed-off-by: Jiri Kosina <jkosina@...e.cz>
> ---
>  drivers/hid/i2c-hid/i2c-hid.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
> index 11140bd..67ab5b7 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -892,6 +892,7 @@ err:
>         if (ihid->irq)
>                 free_irq(ihid->irq, ihid);
>
> +       i2c_hid_free_buffers(ihid);
>         kfree(ihid);
>         return ret;
>  }
>
> --
> Jiri Kosina
> SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ