Commit dbafbccc authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

msvcrt: Remove redundant NULL checks before free().

parent fb1f4275
...@@ -365,7 +365,7 @@ void CDECL MSVCRT__wperror(const MSVCRT_wchar_t* str) ...@@ -365,7 +365,7 @@ void CDECL MSVCRT__wperror(const MSVCRT_wchar_t* str)
} }
} }
MSVCRT_perror(buffer); MSVCRT_perror(buffer);
if (buffer) MSVCRT_free(buffer); MSVCRT_free(buffer);
} }
/********************************************************************* /*********************************************************************
......
...@@ -3498,8 +3498,7 @@ int CDECL MSVCRT__write(int fd, const void* buf, unsigned int count) ...@@ -3498,8 +3498,7 @@ int CDECL MSVCRT__write(int fd, const void* buf, unsigned int count)
if (!WriteFile(hand, q, size, &num_written, NULL)) if (!WriteFile(hand, q, size, &num_written, NULL))
num_written = -1; num_written = -1;
release_ioinfo(info); release_ioinfo(info);
if(p) MSVCRT_free(p);
MSVCRT_free(p);
if (num_written != size) if (num_written != size)
{ {
TRACE("WriteFile (fd %d, hand %p) failed-last error (%d), num_written %d\n", TRACE("WriteFile (fd %d, hand %p) failed-last error (%d), num_written %d\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment