From 8619534a31f88a066182c08b8882ea81e01395e7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 30 Dec 2017 08:37:52 +0100 Subject: [PATCH] Fix resource leaks pointed out by Coverity --- libretro-common/vfs/vfs_implementation.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libretro-common/vfs/vfs_implementation.c b/libretro-common/vfs/vfs_implementation.c index 61088dd606..4595aa9165 100644 --- a/libretro-common/vfs/vfs_implementation.c +++ b/libretro-common/vfs/vfs_implementation.c @@ -237,15 +237,16 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns break; case RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING: /* TODO/FIXME - implement */ - return NULL; + goto error; default: - return NULL; + goto error; } if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) { if (!mode_str) - return NULL; + goto error; + stream->fp = fopen_utf8(path, mode_str); if (!stream->fp)