Fix resource leaks pointed out by Coverity
This commit is contained in:
parent
20122d21ee
commit
8619534a31
|
@ -237,15 +237,16 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns
|
||||||
break;
|
break;
|
||||||
case RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING:
|
case RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING:
|
||||||
/* TODO/FIXME - implement */
|
/* TODO/FIXME - implement */
|
||||||
return NULL;
|
goto error;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||||
{
|
{
|
||||||
if (!mode_str)
|
if (!mode_str)
|
||||||
return NULL;
|
goto error;
|
||||||
|
|
||||||
stream->fp = fopen_utf8(path, mode_str);
|
stream->fp = fopen_utf8(path, mode_str);
|
||||||
|
|
||||||
if (!stream->fp)
|
if (!stream->fp)
|
||||||
|
|
Loading…
Reference in New Issue