[binutils-gdb] Ensure that sframe_xlate_ctx_cleanup() doe snot leave any dangling pointers
Nick Clifton
nickc@sourceware.org
Fri Jul 31 08:07:05 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fa11363bc9ad30671372670ec5216c723ab4db42
commit fa11363bc9ad30671372670ec5216c723ab4db42
Author: Nick Clifton <nickc@redhat.com>
Date: Fri Jul 31 09:06:09 2026 +0100
Ensure that sframe_xlate_ctx_cleanup() doe snot leave any dangling pointers
Diff:
---
gas/gen-sframe.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
index b5c8f649bea..7b8c2f2f20e 100644
--- a/gas/gen-sframe.c
+++ b/gas/gen-sframe.c
@@ -426,7 +426,7 @@ get_fre_dataword_count (const struct sframe_row_entry *sframe_fre, bool flex_p)
static unsigned int
sframe_get_fre_dataword_size (const struct sframe_row_entry *sframe_fre,
- bool flex_p)
+ bool flex_p)
{
unsigned int max_dataword_size = 0;
unsigned int cfa_offset_size = 0;
@@ -1094,6 +1094,10 @@ static void
sframe_xlate_ctx_cleanup (struct sframe_xlate_ctx *xlate_ctx)
{
sframe_row_entry_free (xlate_ctx->first_fre);
+ xlate_ctx->first_fre = NULL;
+ xlate_ctx->last_fre = NULL;
+ xlate_ctx->num_xlate_fres = 0;
+ xlate_ctx->flex_p = false;
XDELETE (xlate_ctx->remember_fre);
xlate_ctx->remember_fre = NULL;
XDELETE (xlate_ctx->cur_fre);
More information about the Binutils-cvs
mailing list