diff options
author | Alan Modra <amodra@gmail.com> | 2019-12-20 10:03:30 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-12-20 13:36:06 +1030 |
commit | 9d78076ef8ef07890ad89c1122bdf49932a979a5 (patch) | |
tree | 24cd4c623db252ec7b2d63d3a36eb0faf67dfbc5 /bfd/format.c | |
parent | fcc5d04f9264b75241fc50cf655a49c9a7de7d76 (diff) | |
download | gdb-9d78076ef8ef07890ad89c1122bdf49932a979a5.zip gdb-9d78076ef8ef07890ad89c1122bdf49932a979a5.tar.gz gdb-9d78076ef8ef07890ad89c1122bdf49932a979a5.tar.bz2 |
bfd_check_format memory leak
* format.c (bfd_check_format_matches): Free matching_vector when
not returning matching target strings.
Diffstat (limited to 'bfd/format.c')
-rw-r--r-- | bfd/format.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/format.c b/bfd/format.c index 1d1363d..17b4855 100644 --- a/bfd/format.c +++ b/bfd/format.c @@ -513,6 +513,8 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) *(const char **) &matching_vector[match_count] = name; } } + else if (matching_vector) + free (matching_vector); return FALSE; } |