aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/linux-thread-db.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8ce75e6..43ee13e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2007-06-28 Michael Snyder <msnyder@access-company.com>
+ * linux-thread-db.c (thread_db_get_thread_local_address): Add
+ gdb_assert before using return value of find_thread_pid (Coverity).
+
* source.c (unset_substitute_path_command): Plug leak (Coverity).
* cli/cli-script.c (build_command_line): Add null pointer guard
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 460e044..91e12e8 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1081,6 +1081,7 @@ thread_db_get_thread_local_address (ptid_t ptid,
/* Get info about the thread. */
thread_info = find_thread_pid (ptid);
+ gdb_assert (thread_info);
thread_db_map_id2thr (thread_info, 1);
/* Finally, get the address of the variable. */