projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0ce6dd
)
Re: bfd_close and target free_cached_memory
author
Alan Modra
<amodra@gmail.com>
Thu, 1 Jun 2023 23:30:41 +0000
(09:00 +0930)
committer
Alan Modra
<amodra@gmail.com>
Fri, 2 Jun 2023 00:11:49 +0000
(09:41 +0930)
_bfd_delete_bfd can be called early, before the target xvec is set up.
* opncls.c (_bfd_delete_bfd): Don't segfault on NULL xvec.
bfd/opncls.c
patch
|
blob
|
history
diff --git
a/bfd/opncls.c
b/bfd/opncls.c
index b0c23b4201cdbd5713342f4d0374194eeb12666f..7cb09a108e5ca90e641aa94f9949ae1a3cb43e0e 100644
(file)
--- a/
bfd/opncls.c
+++ b/
bfd/opncls.c
@@
-157,7
+157,7
@@
static void
_bfd_delete_bfd (bfd *abfd)
{
/* Give the target _bfd_free_cached_info a chance to free memory. */
- if (abfd->memory)
+ if (abfd->memory
&& abfd->xvec
)
bfd_free_cached_info (abfd);
/* The target _bfd_free_cached_info may not have done anything.. */