Message ID | 20181018143718.26298-20-richard@nod.at |
---|---|
State | Accepted |
Delegated to: | David Oberhollenzer |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hcJoa3ZA"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42bXD80J6Wz9sC2 for <incoming@patchwork.ozlabs.org>; Fri, 19 Oct 2018 01:55:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EJU1cAje/yhIa3+vaVUbMrLH3xqU2P41a6NQxG/weMI=; b=hcJoa3ZAvmHTml pdj0jH0N1f2w2e9F/AxWQlHdh2XkDANJ43mSfKvapRhmaoyClWo0yFcZjL3/DuuQAVoz32VdT6L17 P69USsgHcTx2uI/W8r3DzD7tdilNK3fjp5SYmXnvWETFYO9pFF01hszM+cRt1CBcfsprpT601BnvC 6SlQpIE5L1qxFO24hiyjgOIEu6BVtonPfZzcPkCJIz6WOvuve6D8zEg2iMHtnPJesL1uGthipQEsB fIgKrHvDyWEF050UyTEDCeglb7EAw2JY+N24wwuIBOmMsEvt37ScRDNMVaTerBUcQEj0iMUfYLwXX k73zb16v3CYpDFGP/Wmg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gD9i7-0007ul-Mn; Thu, 18 Oct 2018 14:55:39 +0000 Received: from lilium.sigma-star.at ([109.75.188.150]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gD9Rv-0004KQ-9a for linux-mtd@lists.infradead.org; Thu, 18 Oct 2018 14:40:19 +0000 Received: from localhost (localhost [127.0.0.1]) by lilium.sigma-star.at (Postfix) with ESMTP id 317F6180347E7; Thu, 18 Oct 2018 16:38:25 +0200 (CEST) From: Richard Weinberger <richard@nod.at> To: linux-mtd@lists.infradead.org Subject: [PATCH 19/42] mkfs.ubifs: Free all index entry names Date: Thu, 18 Oct 2018 16:36:55 +0200 Message-Id: <20181018143718.26298-20-richard@nod.at> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018143718.26298-1-richard@nod.at> References: <20181018143718.26298-1-richard@nod.at> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181018_073855_541737_D4AF9460 X-CRM114-Status: GOOD ( 12.74 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Cc: Richard Weinberger <richard@nod.at>, david.oberhollenzer@sigma-star.at Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
mtd-utils: Add fscrypt support to mkfs.ubifs
|
expand
|
diff --git a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c index 8aba668f8e28..66ca061cc225 100644 --- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c +++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c @@ -1253,7 +1253,7 @@ static int add_xattr(struct ubifs_ino_node *host_ino, struct stat *st, ino_t inu if (data_len) memcpy(&ino->data, data, data_len); - ret = add_node(&nkey, nm.name, nm.len, ino, UBIFS_INO_NODE_SZ + data_len) ; + ret = add_node(&nkey, NULL, 0, ino, UBIFS_INO_NODE_SZ + data_len); out: free(xent); @@ -1447,7 +1447,7 @@ static int set_fscrypt_context(struct ubifs_ino_node *host_ino, ino_t inum, struct fscrypt_context *fctx) { return add_xattr(host_ino, host_st, inum, - UBIFS_XATTR_NAME_ENCRYPTION_CONTEXT, + xstrdup(UBIFS_XATTR_NAME_ENCRYPTION_CONTEXT), fctx, sizeof(*fctx)); } @@ -2470,8 +2470,10 @@ static int write_index(void) } /* Free stuff */ - for (i = 0; i < idx_cnt; i++) + for (i = 0; i < idx_cnt; i++) { + free(idx_ptr[i]->name); free(idx_ptr[i]); + } free(idx_ptr); free(idx);
...and make valgrind memcheck happy Signed-off-by: Richard Weinberger <richard@nod.at> --- ubifs-utils/mkfs.ubifs/mkfs.ubifs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)