This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 1/5] fix the archive hash table memory leak
- From: nick clifton <nickc at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Binutils Development <binutils at sourceware dot org>
- Date: Tue, 07 Aug 2012 14:40:25 +0100
- Subject: Re: [PATCH 1/5] fix the archive hash table memory leak
- References: <email@example.com>
* 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.