public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: "H.J. Lu" <hjl.tools@gmail.com>, binutils@sourceware.org
Subject: Re: [PATCH v2] gas: Fix memory leaks in gen-sframe.c
Date: Thu, 11 Apr 2024 18:32:17 -0700	[thread overview]
Message-ID: <4891d507-f7d3-428e-8ae8-b99827eb0008@oracle.com> (raw)
In-Reply-To: <20240411112634.2132551-1-hjl.tools@gmail.com>

On 4/11/24 04:26, H.J. Lu wrote:
> 	* gen-sframe.c (sframe_xlate_ctx_cleanup): Call XDELETE on
> 	xlate_ctx->cur_fre.
> 	(create_sframe_all): Call XDELETE on xlate_ctx after use.

Thanks for the patch.

> ---
>   gas/gen-sframe.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
> index 75781fc8ccb..25b858e432b 100644
> --- a/gas/gen-sframe.c
> +++ b/gas/gen-sframe.c
> @@ -847,6 +847,8 @@ sframe_xlate_ctx_cleanup (struct sframe_xlate_ctx *xlate_ctx)
>   	}
>       }
>   
> +  XDELETE (xlate_ctx->cur_fre);
> +
>     sframe_xlate_ctx_init (xlate_ctx);
>   }
>   
> @@ -1360,6 +1362,8 @@ create_sframe_all (void)
>   	  sframe_fde_link (sframe_fde);
>   	}
>       }
> +
> +  XDELETE (xlate_ctx);
>   }
>   
>   void


      reply	other threads:[~2024-04-12  1:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 11:26 H.J. Lu
2024-04-12  1:32 ` Indu Bhagat [this message]

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=4891d507-f7d3-428e-8ae8-b99827eb0008@oracle.com \
    --to=indu.bhagat@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    /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).