From 24ed4862221884c0a4a7523a4cb0012409ca9a55 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 5 Jul 2019 09:59:08 -0700 Subject: [PATCH] VIDEO: Fix coverity identified memory allocation failure error check --- sim_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim_video.c b/sim_video.c index d1475fb9..fe4e72f9 100644 --- a/sim_video.c +++ b/sim_video.c @@ -2159,7 +2159,7 @@ if (!vid_active) { return SCPE_UDIS | SCPE_NOMESSAGE; } fullname = (char *)malloc (strlen(filename) + 5); -if (!filename) +if (!fullname) return SCPE_MEM; #if SDL_MAJOR_VERSION == 1 #if defined(HAVE_LIBPNG)