aboutsummaryrefslogtreecommitdiff
path: root/bfd/opncls.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/opncls.c')
-rw-r--r--bfd/opncls.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 81bd2c8..4771979 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -931,8 +931,13 @@ find_separate_debug_file (abfd, debug_file_directory)
basename = get_debug_link_info (abfd, & crc32);
- if (basename == NULL || strlen (basename) < 1)
+ if (basename == NULL)
return NULL;
+ if (strlen (basename) < 1)
+ {
+ free (basename);
+ return NULL;
+ }
dir = xstrdup (abfd->filename);
BFD_ASSERT (strlen (dir) != 0);