public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/108923] memory leak of get_intrinsic_dummy_arg result
Date: Sat, 25 Feb 2023 20:38:08 +0000	[thread overview]
Message-ID: <bug-108923-4-trEO0lecFq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108923-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108923

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Mikael Morin <mikael@gcc.gnu.org>:

https://gcc.gnu.org/g:5c638095e7e0fa4de4e4f7326384a86830b25732

commit r13-6346-g5c638095e7e0fa4de4e4f7326384a86830b25732
Author: Mikael Morin <mikael@gcc.gnu.org>
Date:   Sat Feb 25 21:37:46 2023 +0100

    fortran: Reuse associated_dummy memory if previously allocated [PR108923]

    This avoids making the associted_dummy field point to a new memory chunk
    if it's already pointing somewhere, in which case doing so would leak the
    previously allocated chunk.

            PR fortran/108923

    gcc/fortran/ChangeLog:

            * intrinsic.cc (get_intrinsic_dummy_arg,
            set_intrinsic_dummy_arg): Rename the former to the latter.
            Remove the return value, add a reference to the lhs as argument,
            and do the pointer assignment inside the function.  Don't do
            it if the pointer is already non-NULL.
            (sort_actual): Update caller.

  parent reply	other threads:[~2023-02-25 20:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 12:28 [Bug fortran/108923] New: " rguenth at gcc dot gnu.org
2023-02-24 16:38 ` [Bug fortran/108923] " mikael at gcc dot gnu.org
2023-02-24 19:41 ` mikael at gcc dot gnu.org
2023-02-24 19:42 ` mikael at gcc dot gnu.org
2023-02-24 21:14 ` cvs-commit at gcc dot gnu.org
2023-02-24 21:44 ` anlauf at gcc dot gnu.org
2023-02-25 20:38 ` cvs-commit at gcc dot gnu.org [this message]
2023-03-03 14:03 ` rguenth at gcc dot gnu.org
2023-03-12 10:48 ` cvs-commit at gcc dot gnu.org
2023-03-12 10:48 ` cvs-commit at gcc dot gnu.org

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=bug-108923-4-trEO0lecFq@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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: link
Be 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).