diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-04-11 04:26:34 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-04-12 03:55:33 -0700 |
commit | 3d67591c6ff0443e36cbc38ece082cc240e87bf6 (patch) | |
tree | 7c3a1244030c3e274ddfb5187275ae967552b6bb /gas | |
parent | 8bad8d5133f3f91c287e63f8046f040fc4d881e8 (diff) | |
download | binutils-3d67591c6ff0443e36cbc38ece082cc240e87bf6.zip binutils-3d67591c6ff0443e36cbc38ece082cc240e87bf6.tar.gz binutils-3d67591c6ff0443e36cbc38ece082cc240e87bf6.tar.bz2 |
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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/gen-sframe.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c index 75781fc..25b858e 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 |