diff options
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/event-loop.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9c3b111..4ae9c5f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2007-08-18 Michael Snyder <msnyder@svkmacdonelllnx> + * 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 e28de9a..c946ce4 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)) |