From: H.J. Lu <hjl@sourceware.org>
To: binutils-cvs@sourceware.org
Subject: [binutils-gdb] gas: Fix memory leaks in gen-sframe.c
Date: Fri, 12 Apr 2024 10:56:39 +0000 (GMT) [thread overview]
Message-ID: <20240412105640.01F123858D38@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3d67591c6ff0443e36cbc38ece082cc240e87bf6
commit 3d67591c6ff0443e36cbc38ece082cc240e87bf6
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Apr 11 04:26:34 2024 -0700
gas: Fix memory leaks in gen-sframe.c
* gen-sframe.c (sframe_xlate_ctx_cleanup): Call XDELETE on
xlate_ctx->cur_fre.
(create_sframe_all): Call XDELETE on xlate_ctx after use.
Diff:
---
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 10:56 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=20240412105640.01F123858D38@sourceware.org \
--to=hjl@sourceware.org \
--cc=binutils-cvs@sourceware.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).