Author: jgardou
Date: Tue Feb 21 21:36:01 2012
New Revision: 55794
URL:
http://svn.reactos.org/svn/reactos?rev=55794&view=rev
Log:
[CRT]
- Check for NULL before freeing
Modified:
trunk/reactos/lib/sdk/crt/stdio/file.c
Modified: trunk/reactos/lib/sdk/crt/stdio/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/file.c?r…
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] Tue Feb 21 21:36:01 2012
@@ -963,10 +963,10 @@
fclose(&_iob[2]);
for(i=0; i<sizeof(__pioinfo)/sizeof(__pioinfo[0]); i++)
- free(__pioinfo[i]);
+ if(__pioinfo[i]) free(__pioinfo[i]);
for(i=0; i<sizeof(fstream)/sizeof(fstream[0]); i++)
- free(fstream[i]);
+ if(fstream[i]) free(fstream[i]);
file_cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&file_cs);