shared: Fix uninitialised pointer in load_jpeg()
image should be initialised to NULL in case image loading fails between setjmp() and xzalloc(). Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
parent
d534977c3e
commit
4a042f939f
|
@ -183,7 +183,7 @@ error_exit(j_common_ptr cinfo)
|
|||
static struct weston_image *
|
||||
load_jpeg(FILE *fp, uint32_t image_load_flags)
|
||||
{
|
||||
struct weston_image *volatile image;
|
||||
struct weston_image *volatile image = NULL;
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct jpeg_error_mgr jerr;
|
||||
struct jpeg_image_data jpeg_image_data = { 0 };
|
||||
|
|
Loading…
Reference in New Issue