[PATCH] gas/read.c memory leak fix

Nick Clifton nickc@cambridge.redhat.com
Wed Jun 12 07:11:00 GMT 2002


Hi Elias,

> I tested it, but I'm not quite sure if it is safe.

It's not.  input_scrub_new_file() records the filename in
physical_input_file, and input_file_open records it in file_name.  To
make the patch safe you would have to add xstrdup()s to both of these
and then arrange for the extra memory to be freed at the right time.

Cheers
        Nick





More information about the Binutils mailing list