public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6857] Fortran: fix FE memleak with BOZ expressions.
@ 2023-03-24 21:09 Harald Anlauf
  0 siblings, 0 replies; only message in thread
From: Harald Anlauf @ 2023-03-24 21:09 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:833233a4aefc9981b671c1bda34676c20b76cc90

commit r13-6857-g833233a4aefc9981b671c1bda34676c20b76cc90
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Fri Mar 24 22:07:37 2023 +0100

    Fortran: fix FE memleak with BOZ expressions.
    
    gcc/fortran/ChangeLog:
    
            * expr.cc (free_expr0): Free also BOZ strings as part of an expression.

Diff:
---
 gcc/fortran/expr.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc
index 4662328bf31..7fb33f81788 100644
--- a/gcc/fortran/expr.cc
+++ b/gcc/fortran/expr.cc
@@ -466,6 +466,10 @@ free_expr0 (gfc_expr *e)
 	  mpc_clear (e->value.complex);
 	  break;
 
+	case BT_BOZ:
+	  free (e->boz.str);
+	  break;
+
 	default:
 	  break;
 	}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-24 21:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 21:09 [gcc r13-6857] Fortran: fix FE memleak with BOZ expressions Harald Anlauf

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).