summaryrefslogtreecommitdiff
path: root/bfd/opncls.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-03-31 18:13:25 +0000
committerNick Clifton <nickc@redhat.com>2003-03-31 18:13:25 +0000
commit8a69f65371379f36566b9384f44480fdbecc4e83 (patch)
tree913ddb3f31ccb6a0c91e49d236351e29c43ab91a /bfd/opncls.c
parenta001226a91dd193cb7d0d0cac19ecadec7546ce8 (diff)
downloadgdb-8a69f65371379f36566b9384f44480fdbecc4e83.tar.gz
Fix memory leaks
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 81bd2c83501..47719797df3 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);