Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Garv <garvkumar1502@gmail.com>
To: linux-erofs@lists.ozlabs.org
Cc: Garv <garvkumar1502@gmail.com>
Subject: [PATCH] erofs-utils: zero directory writer buffer
Date: Tue, 29 Sep 2026 19:09:17 +0530	[thread overview]
Message-ID: <20260929133917.14100-1-garvkumar1502@gmail.com> (raw)

Signed-off-by: Garv <garvkumar1502@gmail.com>
---
 lib/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/inode.c b/lib/inode.c
index ec96556..e7d07e0 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -597,7 +597,7 @@ static struct erofs_vfile *erofs_dirwriter_open(struct erofs_inode *dir)
 {
 	struct erofs_dirwriter_vf *dwv;
 
-	dwv = malloc(sizeof(*dwv) + erofs_blksiz(dir->sbi));
+	dwv = calloc(1, sizeof(*dwv) + erofs_blksiz(dir->sbi));
 	if (!dwv)
 		return ERR_PTR(-ENOMEM);
 	dwv->vf.ops = &erofs_dirwriter_vfops;
-- 
2.53.0



             reply	other threads:[~2026-09-29 13:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 13:39 Garv [this message]
2026-09-29 13:42 ` [PATCH] erofs-utils: zero directory writer buffer Gao Xiang
2026-09-29 18:19   ` Garv Kumar
2026-09-29 18:19   ` Garv Kumar

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=20260929133917.14100-1-garvkumar1502@gmail.com \
    --to=garvkumar1502@gmail.com \
    --cc=linux-erofs@lists.ozlabs.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