diff options
author | Nick Clifton <nickc@redhat.com> | 2003-03-31 18:13:25 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-03-31 18:13:25 +0000 |
commit | 5ed6aba41c826194dcc97807392b22a3cefa1d7e (patch) | |
tree | 8e87d13436f477ba70e90e9109c69dcaf3d18e27 /bfd/opncls.c | |
parent | ee42cf8cc569b0ad926df63483075ccd868a10fa (diff) | |
download | gdb-5ed6aba41c826194dcc97807392b22a3cefa1d7e.zip gdb-5ed6aba41c826194dcc97807392b22a3cefa1d7e.tar.gz gdb-5ed6aba41c826194dcc97807392b22a3cefa1d7e.tar.bz2 |
Fix memory leaks
Diffstat (limited to 'bfd/opncls.c')
-rw-r--r-- | bfd/opncls.c | 7 |
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); |