--- ../atomicparsley-0.9.0/AP_AtomExtracts.cpp 2006-09-16 09:09:46.000000000 +1000 +++ ./AP_AtomExtracts.cpp 2009-04-08 16:27:53.000000000 +1000 @@ -1223,6 +1223,7 @@ } } } + free(uint32_buffer); return; } --- ../atomicparsley-0.9.0/AtomicParsley.cpp 2006-09-16 09:22:33.000000000 +1000 +++ ./AtomicParsley.cpp 2009-04-08 17:06:07.000000000 +1000 @@ -245,9 +245,10 @@ if (source_file != NULL) { file_opened = true; } - } else { + } else if(!open && file_opened){ fclose(source_file); file_opened = false; + source_file = NULL; } return source_file; } @@ -1704,9 +1705,9 @@ } //end if AtomFlags_Data_UInt } - free(data_payload); - data_payload = NULL; } + free(data_payload); + data_payload = NULL; } } return;