public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6344] Fortran: fix memory leak with real to integer conversion warning Date: Sat, 25 Feb 2023 18:08:03 +0000 (GMT) [thread overview] Message-ID: <20230225180803.E60AD3858417@sourceware.org> (raw) 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) {
reply other threads:[~2023-02-25 18:08 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230225180803.E60AD3858417@sourceware.org \ --to=anlauf@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).