Boot loader fixes - fix recursive malloc()/free() errors, NULL freed fields
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 15 Feb 2009 07:45:22 +0000 (23:45 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 15 Feb 2009 07:45:22 +0000 (23:45 -0800)
commit6825e71f24cd3f80f065ebcb42de337cd284ec92
tree6e916fcdb86f98ea44849918ca29699aa0309dc8
parentf453291a75840c190fff8442e04f34a0dee0f096
Boot loader fixes - fix recursive malloc()/free() errors, NULL freed fields

* Fix reported loader panics related to corrupt malloc areas.  The zip/gzip
  modules were using a static variable to hold malloc()ed space.  The
  field was getting tromped by recursion.

* Fix numerous cases where file structure fields are not NULL'd out upon
  release.

* Fix numerous cases where a double close might result in a double free.

* Fix a benign bug in libstand's realloc().
13 files changed:
lib/libstand/bzipfs.c
lib/libstand/cd9660.c
lib/libstand/close.c
lib/libstand/dosfs.c
lib/libstand/ext2fs.c
lib/libstand/gzipfs.c
lib/libstand/hammerread.c
lib/libstand/open.c
lib/libstand/tftp.c
lib/libstand/ufs.c
lib/libstand/zalloc_malloc.c
lib/libstand/zipfs.c
sys/boot/common/devopen.c