diff options
author | Martin Liska <mliska@suse.cz> | 2019-06-27 10:21:32 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-06-27 08:21:32 +0000 |
commit | c2f7a665a184e4ff00a6ac3fc147f63f276cc5a5 (patch) | |
tree | 73d8a4968841119728532fccadcef88a226783c5 /libgcc | |
parent | b5b31291bd21749edc3d1f1d74ac09fcb6a89310 (diff) | |
download | gcc-c2f7a665a184e4ff00a6ac3fc147f63f276cc5a5.zip gcc-c2f7a665a184e4ff00a6ac3fc147f63f276cc5a5.tar.gz gcc-c2f7a665a184e4ff00a6ac3fc147f63f276cc5a5.tar.bz2 |
Fix misc stuff seen by clang-static-analyzer.
2019-06-27 Martin Liska <mliska@suse.cz>
* lto-dump.c (struct symbol_entry): Add default dtor.
(struct variable_entry): Likewise.
(struct function_entry): Likewise.
(dump_list_functions): Release memory.
(dump_list_variables): Likewise.
2019-06-27 Martin Liska <mliska@suse.cz>
* libgcov-util.c (gcov_profile_merge): Release allocated
memory.
(calculate_overlap): Likewise.
From-SVN: r272733
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 6 | ||||
-rw-r--r-- | libgcc/libgcov-util.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index a6e8c20..fa82306 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2019-06-27 Martin Liska <mliska@suse.cz> + + * libgcov-util.c (gcov_profile_merge): Release allocated + memory. + (calculate_overlap): Likewise. + 2019-06-25 Iain Sandoe <iain@sandoe.co.uk> * config.host: Add libef_ppc.a to the extra files for powerpc-darwin. diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index c794132..404ece6 100644 --- a/libgcc/libgcov-util.c +++ b/libgcc/libgcov-util.c @@ -681,6 +681,9 @@ gcov_profile_merge (struct gcov_info *tgt_profile, struct gcov_info *src_profile tgt_tail = gi_ptr; } + free (in_src_not_tgt); + free (tgt_infos); + return 0; } @@ -1280,6 +1283,8 @@ calculate_overlap (struct gcov_info *gcov_list1, } + free (all_infos); + if (overlap_obj_level) printf(" SUM:%36s overlap = %6.2f%% (%5.2f%% %5.2f%%)\n", "", sum_val*100, sum_cum_1*100, sum_cum_2*100); |