This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/5] fix the archive hash table memory leak


Hi Tom,

	* archive.c (_bfd_delete_archive_data): New function.
	* libbfd-in.h (_bfd_delete_archive_data): Declare.
	* libbfd.h: Rebuild.
	* opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data

Approved and applied.


Note - there was a small problem with the patch: _bfd_delete_archive_data was being called on bfds which were not archives (and hence bfd_ardata() returned a pointer to a structure that was not a struct artdata). I fixed this by adding a test of the format in _bfd_delete_bfd before calling _bfd_delete_archive_data.

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]