public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] incpath, Fortran: Fix memory leak in gfc_add_include_path
@ 2021-11-05 21:17 Bernhard Reutner-Fischer
  2021-11-05 21:17 ` [PATCH 1/2] Add free_cpp_dirs() Bernhard Reutner-Fischer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bernhard Reutner-Fischer @ 2021-11-05 21:17 UTC (permalink / raw)
  To: gcc-patches, fortran; +Cc: Bernhard Reutner-Fischer

Hi!

In order to fix this very minor leak, we need a knob to free all
cpp_dirs that were added.
This adds a free_cpp_dirs() to gcc/incpath and needs review from some
global maintainer or maybe libcpp maintainer for this hunk.

Bootstrapped and regtested on x86_64-unknown-linux without regressions.
Ok for tunk?

Bernhard Reutner-Fischer (2):
  Add free_cpp_dirs()
  Fortran: Fix memory leak in gfc_add_include_path [PR68800]

 gcc/fortran/cpp.c      | 13 +++++++++++--
 gcc/fortran/cpp.h      |  1 +
 gcc/fortran/f95-lang.c |  2 +-
 gcc/fortran/scanner.c  |  7 ++++---
 gcc/incpath.c          | 13 +++++++++++++
 gcc/incpath.h          |  1 +
 6 files changed, 31 insertions(+), 6 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-02 19:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 21:17 [PATCH 0/2] incpath, Fortran: Fix memory leak in gfc_add_include_path Bernhard Reutner-Fischer
2021-11-05 21:17 ` [PATCH 1/2] Add free_cpp_dirs() Bernhard Reutner-Fischer
2021-11-05 21:17 ` [PATCH 2/2] Fortran: Fix memory leak in gfc_add_include_path [PR68800] Bernhard Reutner-Fischer
2021-11-06 19:22   ` Harald Anlauf
2021-11-07  1:38     ` Bernhard Reutner-Fischer
2023-04-02 19:27       ` Bernhard Reutner-Fischer
2021-11-05 22:59 ` [PATCH 0/2] incpath, Fortran: Fix memory leak in gfc_add_include_path Bernhard Reutner-Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).