diff options
Diffstat (limited to 'bfd/opncls.c')
-rw-r--r-- | bfd/opncls.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/opncls.c b/bfd/opncls.c index a0374e3..3337efe 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -709,7 +709,9 @@ bfd_close (bfd *abfd) vector. Until that's done, at least don't leak memory. */ struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream; - free (bim->buffer); + + if (bim->buffer != NULL) + free (bim->buffer); free (bim); ret = TRUE; } |