public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: H.J. Lu <hjl@sourceware.org>
To: binutils-cvs@sourceware.org
Subject: [binutils-gdb] gas: Free unused memory in scfi_ops_cleanup
Date: Tue, 16 Apr 2024 13:34:39 +0000 (GMT)	[thread overview]
Message-ID: <20240416133439.489093858D35@sourceware.org> (raw)

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.  */

                 reply	other threads:[~2024-04-16 13:34 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=20240416133439.489093858D35@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).