This is the mail archive of the binutils@sourceware.cygnus.com 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]

Re: objdump leaks?


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. |



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