winpr-file: fixed memory leak in error case
This commit is contained in:
parent
d2790d92c8
commit
96e267fcdf
@ -227,6 +227,9 @@ HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
|
|||||||
if (status != 0)
|
if (status != 0)
|
||||||
{
|
{
|
||||||
close(pNamedPipe->clientfd);
|
close(pNamedPipe->clientfd);
|
||||||
|
free((char *)pNamedPipe->name);
|
||||||
|
free((char *)pNamedPipe->lpFileName);
|
||||||
|
free((char *)pNamedPipe->lpFilePath);
|
||||||
free(pNamedPipe);
|
free(pNamedPipe);
|
||||||
return INVALID_HANDLE_VALUE;
|
return INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user