+2009-06-17 Tom Tromey <tromey@redhat.com>
+
+ * dwarf2read.c (zlib_decompress_section): Use a cleanup.
+
2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
* gdbarch.sh (pointer_to_address): Change to type 'm'.
#else
bfd_size_type compressed_size = bfd_get_section_size (sectp);
gdb_byte *compressed_buffer = xmalloc (compressed_size);
+ struct cleanup *cleanup = make_cleanup (xfree, compressed_buffer);
bfd_size_type uncompressed_size;
gdb_byte *uncompressed_buffer;
z_stream strm;
error (_("Dwarf Error: concluding DWARF uncompression in '%s': %d"),
bfd_get_filename (abfd), rc);
- xfree (compressed_buffer);
+ do_cleanups (cleanup);
*outbuf = uncompressed_buffer;
*outsize = uncompressed_size;
#endif