[PATCH] gas: Free unused memory in scfi_ops_cleanup

Indu Bhagat indu.bhagat@oracle.com
Thu Apr 11 05:40:32 GMT 2024


On 4/9/24 16:04, H.J. Lu wrote:
> 	* scfi.c (scfi_ops_cleanup): Free op->op_data and head.

Thanks for the patch.

> ---
>   gas/scfi.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/gas/scfi.c b/gas/scfi.c
> index f34150cb08a..24170c7f8ee 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.  */



More information about the Binutils mailing list