aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-11 22:31:44 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-11 22:31:44 +0000
commit60bc018fc618ca187b4372d4fb35e7a40e0dbdb9 (patch)
tree5f5e210c30a2298ebc5728b3e7054e95a5001d5a /gdb
parentf3be5b643183867a024c5917a9c96a30f4a179b6 (diff)
downloadfsf-binutils-gdb-60bc018fc618ca187b4372d4fb35e7a40e0dbdb9.zip
fsf-binutils-gdb-60bc018fc618ca187b4372d4fb35e7a40e0dbdb9.tar.gz
fsf-binutils-gdb-60bc018fc618ca187b4372d4fb35e7a40e0dbdb9.tar.bz2
2011-03-11 Michael Snyder <msnyder@vmware.com>
* event-loop-c (delete_async_signal_handler): Assert prev_ptr. (delete_async_event_handler): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/event-loop.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 898ff01..5b76bee 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2011-03-11 Michael Snyder <msnyder@vmware.com>
+ * event-loop-c (delete_async_signal_handler): Assert prev_ptr.
+ (delete_async_event_handler): Ditto.
+
* python/py-breakpoint.c (bppy_set_condition): Stop memory leak.
* python/py-breakpoint.c (bppy_get_commands): Fix memory leak.
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index 7f81bb3..617835f 100644
--- a/gdb/event-loop.c
+++ b/gdb/event-loop.c
@@ -1077,6 +1077,7 @@ delete_async_signal_handler (async_signal_handler ** async_handler_ptr)
prev_ptr = sighandler_list.first_handler;
while (prev_ptr && prev_ptr->next_handler != (*async_handler_ptr))
prev_ptr = prev_ptr->next_handler;
+ gdb_assert (prev_ptr);
prev_ptr->next_handler = (*async_handler_ptr)->next_handler;
if (sighandler_list.last_handler == (*async_handler_ptr))
sighandler_list.last_handler = prev_ptr;
@@ -1185,6 +1186,7 @@ delete_async_event_handler (async_event_handler **async_handler_ptr)
prev_ptr = async_event_handler_list.first_handler;
while (prev_ptr && prev_ptr->next_handler != *async_handler_ptr)
prev_ptr = prev_ptr->next_handler;
+ gdb_assert (prev_ptr);
prev_ptr->next_handler = (*async_handler_ptr)->next_handler;
if (async_event_handler_list.last_handler == (*async_handler_ptr))
async_event_handler_list.last_handler = prev_ptr;