!14 fix memory leak in bfd_check_format()
Merge pull request !14 from wangchen/binutils-branch
This commit is contained in:
commit
3cca024aec
27
bfd_check_format-memory-leak.patch
Normal file
27
bfd_check_format-memory-leak.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 9d78076ef8ef07890ad89c1122bdf49932a979a5 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Fri, 20 Dec 2019 10:03:30 +1030
|
||||
Subject: [PATCH] bfd_check_format memory leak
|
||||
|
||||
* format.c (bfd_check_format_matches): Free matching_vector when
|
||||
not returning matching target strings.
|
||||
---
|
||||
bfd/format.c | 2 ++
|
||||
1 files changed, 2 insertions(+)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: Binary utilities
|
||||
Name: binutils
|
||||
Version: 2.33.1
|
||||
Release: 6
|
||||
Release: 7
|
||||
License: GPLv3+
|
||||
URL: https://sourceware.org/binutils
|
||||
|
||||
@ -35,6 +35,7 @@ Patch18: ubsan-cr16-left-shift-cannot-be-represented-in-type-int.patch
|
||||
Patch19: More-signed-overflow-fixes.patch
|
||||
Patch20: Use-disassemble_info-private_data-in-place-of-insn_sets.patch
|
||||
Patch21: PR24960-Memory-leak-from-disassembler.patch
|
||||
Patch22: bfd_check_format-memory-leak.patch
|
||||
|
||||
Provides: bundled(libiberty)
|
||||
|
||||
@ -319,6 +320,12 @@ fi
|
||||
%{_infodir}/bfd*info*
|
||||
|
||||
%changelog
|
||||
* Fri May 15 2020 wangchen <wangchen137@huawei.com> - 2.33.1-7
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix memory leak in bfd_check_format
|
||||
|
||||
* Thu Apr 02 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.33.1-6
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user