public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6344] Fortran: fix memory leak with real to integer conversion warning
@ 2023-02-25 18:08 Harald Anlauf
0 siblings, 0 replies; only message in thread
From: Harald Anlauf @ 2023-02-25 18:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:03c60e525bea13c15edd2f64cd582f168fe80bfb
commit r13-6344-g03c60e525bea13c15edd2f64cd582f168fe80bfb
Author: Harald Anlauf <anlauf@gmx.de>
Date: Sat Feb 25 19:05:38 2023 +0100
Fortran: fix memory leak with real to integer conversion warning
gcc/fortran/ChangeLog:
* arith.cc (gfc_real2int): Clear mpfr variable after use.
Diff:
---
gcc/fortran/arith.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/fortran/arith.cc b/gcc/fortran/arith.cc
index d0d1c0b03d2..37aeaf1b186 100644
--- a/gcc/fortran/arith.cc
+++ b/gcc/fortran/arith.cc
@@ -2257,6 +2257,7 @@ gfc_real2int (gfc_expr *src, int kind)
gfc_typename (&result->ts), &src->where);
did_warn = true;
}
+ mpfr_clear (f);
}
if (!did_warn && warn_conversion_extra)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-25 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-25 18:08 [gcc r13-6344] Fortran: fix memory leak with real to integer conversion warning 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).