mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:25:48 +00:00
Free allocated resource on error, CID 1358.
svn path=/trunk/; revision=37853
This commit is contained in:
parent
d27e3fc707
commit
ea4870e585
1 changed files with 5 additions and 1 deletions
|
@ -1095,7 +1095,11 @@ FILE* CDECL _wfdopen(int fd, const wchar_t *mode)
|
|||
if (modea &&
|
||||
WideCharToMultiByte(CP_ACP,0,mode,mlen,modea,mlen,NULL,NULL))
|
||||
{
|
||||
if (get_flags(modea, &open_flags, &stream_flags) == -1) return NULL;
|
||||
if (get_flags(modea, &open_flags, &stream_flags) == -1)
|
||||
{
|
||||
free(modea);
|
||||
return NULL;
|
||||
}
|
||||
LOCK_FILES();
|
||||
if (!(file = alloc_fp()))
|
||||
file = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue