mirror of
https://github.com/holub/mame
synced 2025-06-04 11:56:28 +03:00
fixed potential memory leak in win_open_ptty() (nw)
This commit is contained in:
parent
cf299c7525
commit
4492240b14
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user