aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-06-15 10:02:31 +0930
committerAlan Modra <amodra@gmail.com>2023-06-15 10:11:56 +0930
commit6a28a3c20044db82f86aad208497e2c8f6557f93 (patch)
treedd4f85579df668aa3b2d3b7d38d782f7489ea9df /bfd
parent87642f631119652ed57ccbdf7cfbfcf518b315a1 (diff)
downloadbinutils-6a28a3c20044db82f86aad208497e2c8f6557f93.zip
binutils-6a28a3c20044db82f86aad208497e2c8f6557f93.tar.gz
binutils-6a28a3c20044db82f86aad208497e2c8f6557f93.tar.bz2
vms write_archive memory leaks
This fixes two memory leaks in the vms archive handling. * vms-lib.c (_bfd_vms_lib_build_map): Free input symbols. (_bfd_vms_lib_write_archive_contents): Free archive map symbols.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/vms-lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c
index ab93876..298e959 100644
--- a/bfd/vms-lib.c
+++ b/bfd/vms-lib.c
@@ -2108,6 +2108,7 @@ _bfd_vms_lib_build_map (unsigned int nbr_modules,
*res_cnt = map_count;
*res = map;
+ free (syms);
return true;
error_return:
@@ -2394,6 +2395,7 @@ _bfd_vms_lib_write_archive_contents (bfd *arch)
goto err;
}
+ free (symbols);
return true;
input_err: