2013-05-21 Paul Pluzhnikov <ppluzhnikov@google.com>
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Tue, 21 May 2013 23:41:29 +0000 (23:41 +0000)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Tue, 21 May 2013 23:41:29 +0000 (23:41 +0000)
* solib-svr4.c (svr4_free_so): Protect against NULL dereference.

gdb/ChangeLog
gdb/solib-svr4.c

index 24e5eb4f9221059acfb99fb5666d1af4273e4073..1d325d0e25e0cac17387814ad8a6215d19530bd4 100644 (file)
@@ -1,3 +1,7 @@
+2013-05-21  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+       * solib-svr4.c (svr4_free_so): Protect against NULL dereference.
+
 2013-05-21  Pedro Alves  <palves@redhat.com>
 
        * python/py-prettyprint.c (apply_val_pretty_printer): Check
index 4e094728e89ec6f0a82f6418f0c003d88ba5ec89..055fcb73eadb9d97b43312f60d6e844e5b1f59ee 100644 (file)
@@ -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).  */