Re: [PATCH] fix memory leak media IR keytable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yoichi,

Yoichi Yuasa wrote:
> Signed-off-by: Yoichi Yuasa <yuasa@xxxxxxxxxxxxxx>
> ---
>  drivers/media/IR/ir-keytable.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
> index b521ed9..44501d9 100644
> --- a/drivers/media/IR/ir-keytable.c
> +++ b/drivers/media/IR/ir-keytable.c
> @@ -422,8 +422,10 @@ int ir_input_register(struct input_dev *input_dev,
>  	ir_dev->rc_tab.size = ir_roundup_tablesize(rc_tab->size);
>  	ir_dev->rc_tab.scan = kzalloc(ir_dev->rc_tab.size *
>  				    sizeof(struct ir_scancode), GFP_KERNEL);
> -	if (!ir_dev->rc_tab.scan)
> +	if (!ir_dev->rc_tab.scan) {
> +		kfree(ir_dev);
>  		return -ENOMEM;
> +	}


Thanks for the patch, but we've received and applied an identical fix at the development
tree.

-- 

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux