From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1039) id 489093858D35; Tue, 16 Apr 2024 13:34:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 489093858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713274479; bh=lolHLCu07BMofY9hFCi7Ouw9Z+vGodpy+nA07Kpd2Sk=; h=From:To:Subject:Date:From; b=Y+31vzW4aQxhc2sMS5DmCSE0CzmjWtADe19ZdDC/M+uAcmDKlM1vwEw9/ehPnGXin cbu3NkKuhScP74ruHcXONTwQNbI0JTcFwehediMO+Pgpjca21i/h+1NGLmzsaqcrUz K28Bpgx7KYHSAQwfs65GwrkWU9tSuBz/hnPD0hkg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: H.J. Lu To: binutils-cvs@sourceware.org Subject: [binutils-gdb] gas: Free unused memory in scfi_ops_cleanup X-Act-Checkin: binutils-gdb X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/master X-Git-Oldrev: 21061c384c510e13b56c3991adf31ad85e80a824 X-Git-Newrev: aa38e605634e5ce8357d610655d6eb72c3e7d2d2 Message-Id: <20240416133439.489093858D35@sourceware.org> Date: Tue, 16 Apr 2024 13:34:39 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Daa38e605634e= 5ce8357d610655d6eb72c3e7d2d2 commit aa38e605634e5ce8357d610655d6eb72c3e7d2d2 Author: H.J. Lu Date: Tue Apr 9 16:04:49 2024 -0700 gas: Free unused memory in scfi_ops_cleanup =20 * 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) =20 while (op) { + free (op->op_data); free (op); op =3D next; next =3D op ? op->next : NULL; } + + free (head); } =20 /* Compare two SCFI states. */