diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-03-20 14:40:41 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-21 08:04:32 +0100 |
commit | b5563094d7dffac4dda654db476036b97a614e3a (patch) | |
tree | ae17dec68cba767dbc60776d17b1851575d88ec7 /drivers | |
parent | af4fd0e7a43633e768685b8baf0b5d11d952bbe6 (diff) |
Staging: atomisp: fix an uninitialized variable bug
There are some error paths in atomisp_css_frame_allocate() which don't
initialize "res" so it could lead us to try release random memory.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c index 08da8ea062ca..37d334e00be0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c @@ -4722,7 +4722,7 @@ static int atomisp_v4l2_framebuffer_to_css_frame(const struct v4l2_framebuffer *arg, struct atomisp_css_frame **result) { - struct atomisp_css_frame *res; + struct atomisp_css_frame *res = NULL; unsigned int padded_width; enum atomisp_css_frame_format sh_format; char *tmp_buf = NULL; |