fixed potential memory leak in win_open_ptty() (nw)

This commit is contained in:
Oliver Stöneberg 2013-09-08 16:28:28 +00:00
parent cf299c7525
commit 4492240b14

View File

@ -18,13 +18,14 @@ file_error win_open_ptty(const char *path, UINT32 openflags, osd_file **file, UI
return FILERR_OUT_OF_MEMORY;
pipe = CreateNamedPipe(t_name, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_NOWAIT, 1, 32, 32, 0, NULL);
osd_free(t_name);
if(pipe == INVALID_HANDLE_VALUE)
return FILERR_ACCESS_DENIED;
(*file)->handle = pipe;
*filesize = 0;
osd_free(t_name);
return FILERR_NONE;
}