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:
Loïc Molinari 2024-06-13 18:57:49 +02:00 committed by Daniel Stone
parent d534977c3e
commit 4a042f939f
1 changed files with 1 additions and 1 deletions

View File

@ -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 };