This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: objdump leaks?
- To: Alan Modra <alan at linuxcare dot com dot au>
- Subject: Re: objdump leaks?
- From: Alex Rosenberg <alexr at spies dot com>
- Date: Wed, 24 May 2000 18:19:42 -0700
- CC: <binutils at sourceware dot cygnus dot com>
on 5/23/00 7:10 PM, Alan Modra at alan@linuxcare.com.au wrote:
> On Tue, 23 May 2000, Alex Rosenberg wrote:
>> display_target_list() and display_info_table() both appear to leak bfd
>> structures because their calls to bfd_openw() are not matched by bfd_close()
>> calls.
>
> Does this fix your problem?
Yes. (I've simply got to get diff/patch working on this oddball host...)
However, this last part of the patch may have a minor error:
> diff -u -p -r1.25 objdump.c
> --- objdump.c 2000/05/13 06:38:34 1.25
> +++ objdump.c 2000/05/24 02:06:39
> @@ -2727,6 +2729,7 @@ display_info_table (first, last)
> putchar ('-');
> putchar (' ');
> }
>+ bfd_close (abfd);
> }
> putchar ('\n');
> }
It looks like abfd could be NULL when this bfd_close() happens.
+------------------------------------------------------------+
| Alexander M. Rosenberg <mailto:alexr@_spies.com> |
| Nobody cares what I say. Remove the underscore to mail me. |