public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] gas: Free unused memory in scfi_ops_cleanup
@ 2024-04-16 13:34 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2024-04-16 13:34 UTC (permalink / raw)
  To: binutils-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aa38e605634e5ce8357d610655d6eb72c3e7d2d2

commit aa38e605634e5ce8357d610655d6eb72c3e7d2d2
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Apr 9 16:04:49 2024 -0700

    gas: Free unused memory in scfi_ops_cleanup
    
    * scfi.c (scfi_ops_cleanup): Free op->op_data and head.

Diff:
---
 gas/scfi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gas/scfi.c b/gas/scfi.c
index b29e922ecb3..744822d8102 100644
--- a/gas/scfi.c
+++ b/gas/scfi.c
@@ -141,10 +141,13 @@ scfi_ops_cleanup (scfi_opS **head)
 
   while (op)
     {
+      free (op->op_data);
       free (op);
       op = next;
       next = op ? op->next : NULL;
     }
+
+  free (head);
 }
 
 /* Compare two SCFI states.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-16 13:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16 13:34 [binutils-gdb] gas: Free unused memory in scfi_ops_cleanup H.J. Lu

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).