From: Michael Snyder Date: Sat, 18 Aug 2007 20:05:48 +0000 (+0000) Subject: 2007-08-18 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32107cd542eff63c06004408434cf337597fb2f1;p=binutils-gdb.git 2007-08-18 Michael Snyder * event-loop.c (delete_async_signal_handler): Move pointer null test to before pointer dereference. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9c3b1118a47..4ae9c5f7a2b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2007-08-18 Michael Snyder + * event-loop.c (delete_async_signal_handler): Move pointer null + test to before pointer dereference. + * ui-out.c (append_header_to_list): Possible cut and paste error. * MAINTAINERS: white space tweak. diff --git a/gdb/event-loop.c b/gdb/event-loop.c index e28de9a39d9..c946ce48cc4 100644 --- a/gdb/event-loop.c +++ b/gdb/event-loop.c @@ -950,7 +950,7 @@ delete_async_signal_handler (async_signal_handler ** async_handler_ptr) else { prev_ptr = sighandler_list.first_handler; - while (prev_ptr->next_handler != (*async_handler_ptr) && prev_ptr) + while (prev_ptr && prev_ptr->next_handler != (*async_handler_ptr)) prev_ptr = prev_ptr->next_handler; prev_ptr->next_handler = (*async_handler_ptr)->next_handler; if (sighandler_list.last_handler == (*async_handler_ptr))