Fix resource leaks pointed out by Coverity

This commit is contained in:
twinaphex 2017-12-30 08:37:52 +01:00
parent 20122d21ee
commit 8619534a31

View File

@ -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)