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
1 changed files with 4 additions and 3 deletions

View File

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