[RFA]: Fix do_cleanups if oldchain is NULL

Jeff Johnston jjohnstn@redhat.com
Wed Dec 17 21:05:00 GMT 2003

I recently solved a bug on the ia64 concerning cleanups.  What was 
happening was that a cleanup list was being re-initialized to NULL 
inside a loop and later do_cleanups() was called.  This caused the 
entire cleanup list to be run because the design is to run the list 
until the passed in cleanup is reached.  This caused other errors when 
the stream being used was deleted, etc...

This patch adds a check to do_my_cleanups() so no cleanups will be 
performed if the passed in chain is NULL.

Ok to commit?

-- Jeff J.

2003-12-17  Jeff Johnston  <jjohnstn@redhat.com>

        * utils.c (do_my_cleanups): Don't do cleanups if old chain
        passed in is NULL.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: utils.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20031217/2e168d25/attachment.ksh>

More information about the Gdb-patches mailing list