aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2013-05-21 23:41:29 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2013-05-21 23:41:29 +0000
commit6dcc1893b6542ed5605fa1079a817adecb73daa0 (patch)
tree127ab224331f3d57bdba29ce8863206f568c75bd /gdb/solib-svr4.c
parent93acabad6a0ff499e4e18d44c41292ef48cde104 (diff)
downloadgdb-6dcc1893b6542ed5605fa1079a817adecb73daa0.zip
gdb-6dcc1893b6542ed5605fa1079a817adecb73daa0.tar.gz
gdb-6dcc1893b6542ed5605fa1079a817adecb73daa0.tar.bz2
2013-05-21 Paul Pluzhnikov <ppluzhnikov@google.com>
* solib-svr4.c (svr4_free_so): Protect against NULL dereference.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 4e09472..055fcb7 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -971,7 +971,8 @@ svr4_free_so (struct so_list *so)
static void
svr4_clear_so (struct so_list *so)
{
- so->lm_info->l_addr_p = 0;
+ if (so->lm_info != NULL)
+ so->lm_info->l_addr_p = 0;
}
/* Free so_list built so far (called via cleanup). */