Skip to content
Commit 2649c1a2 authored by Wei Chen's avatar Wei Chen Committed by Hans Verkuil
Browse files

media: hi846: Fix memleak in hi846_init_controls()



hi846_init_controls doesn't clean the allocated ctrl_hdlr
in case there is a failure, which causes memleak. Add
v4l2_ctrl_handler_free to free the resource properly.

Fixes: e8c08826 ("media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera")
Signed-off-by: default avatarWei Chen <harperchen1110@gmail.com>
Reviewed-by: default avatarMartin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 5a4e1b5a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment