]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: Free unused memory in scfi_ops_cleanup
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 9 Apr 2024 23:04:49 +0000 (16:04 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 16 Apr 2024 13:31:47 +0000 (06:31 -0700)
* scfi.c (scfi_ops_cleanup): Free op->op_data and head.

gas/scfi.c

index b29e922ecb3b08a2974144a5cb873d137a2345a3..744822d8102349891370728e428660511848d241 100644 (file)
@@ -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.  */