Fixed coverity issue 1047602

This commit is contained in:
Armin Novak 2013-08-28 17:36:55 +02:00
parent 53e0d53b99
commit 64c3aafcc6

View File

@ -65,7 +65,13 @@ BOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpP
pWritePipe = (WINPR_PIPE*) malloc(sizeof(WINPR_PIPE));
if (!pReadPipe || !pWritePipe)
{
if (pReadPipe)
free(pReadPipe);
if (pWritePipe)
free(pWritePipe);
return FALSE;
}
pReadPipe->fd = pipe_fd[0];
pWritePipe->fd = pipe_fd[1];