summarylogtreecommitdiffstats
path: root/libecwj2-3.3-3245b.patch
blob: 7f01dc31779cba23025286e49f13e2feecc8b9d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- Source/C/tinyxml/tinyxml.cpp	2010-10-29 16:12:42.000000000 +0100
+++ Source/C/tinyxml/tinyxml.cpp	2010-10-29 16:13:54.000000000 +0100
@@ -1020,6 +1020,8 @@
 
 		if ( fread( buf, length, 1, file ) != 1 ) {
 		//if ( fread( buf, 1, length, file ) != (size_t)length ) {
+			delete [] buf;
+			buf = 0;
 			SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
 			fclose( file );
 			return false;