archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <>
To: Gao Xiang <>,, Liu Bo <>
Cc: LKML <>,
	Dan Carpenter <>,
	kernel test robot <>
Subject: Re: [PATCH] erofs: fix double free of 'copied'
Date: Wed, 25 Aug 2021 20:16:31 +0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 2021/8/25 20:07, Gao Xiang wrote:
> Dan reported a new smatch warning [1]
> "fs/erofs/inode.c:210 erofs_read_inode() error: double free of 'copied'"
> Due to new chunk-based format handling logic, the error path can be
> called after kfree(copied).
> Set "copied = NULL" after kfree(copied) to fix this.
> [1]
> Fixes: c5aa903a59db ("erofs: support reading chunk-based uncompressed files")
> Reported-by: kernel test robot <>
> Reported-by: Dan Carpenter <>
> Signed-off-by: Gao Xiang <>

Reviewed-by: Chao Yu <>


      reply	other threads:[~2021-08-25 12:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 12:07 [PATCH] erofs: fix double free of 'copied' Gao Xiang
2021-08-25 12:16 ` Chao Yu [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).