diff options
author | Michael Snyder <msnyder@vmware.com> | 2007-08-18 20:05:48 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2007-08-18 20:05:48 +0000 |
commit | 32107cd542eff63c06004408434cf337597fb2f1 (patch) | |
tree | 5affab09fd03722a6b2914ec436545f404ac03dd | |
parent | 44db85f8e2cc837d0aebe53fa662f788e4b9bbd5 (diff) | |
download | gdb-32107cd542eff63c06004408434cf337597fb2f1.zip gdb-32107cd542eff63c06004408434cf337597fb2f1.tar.gz gdb-32107cd542eff63c06004408434cf337597fb2f1.tar.bz2 |
2007-08-18 Michael Snyder <msnyder@access-company.com>
* event-loop.c (delete_async_signal_handler): Move pointer null
test to before pointer dereference.
-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)) |