Fix elf64-ppc.c electric fence warning
[deliverable/binutils-gdb.git] / bfd / compress.c
index 3fcbd783ee40255f3c72a5d0f555c66496432041..0087a665d87b3357e0ba190acdc347892bd944ca 100644 (file)
@@ -1,5 +1,5 @@
 /* Compressed section support (intended for debug sections).
-   Copyright (C) 2008-2014 Free Software Foundation, Inc.
+   Copyright (C) 2008-2015 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -244,6 +244,8 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
 #endif
 
     case COMPRESS_SECTION_DONE:
+      if (sec->contents == NULL)
+       return FALSE;
       if (p == NULL)
        {
          p = (bfd_byte *) bfd_malloc (sz);
This page took 0.02483 seconds and 4 git commands to generate.