lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 21 Apr 2020 20:48:28 +0800 From: Qu Wenruo <wqu@...e.com> To: Colin King <colin.king@...onical.com>, Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>, David Sterba <dsterba@...e.com>, Johannes Thumshirn <johannes.thumshirn@....com>, <linux-btrfs@...r.kernel.org> CC: <kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org> Subject: Re: [PATCH][next] btrfs: fix check for memory allocation failure of ret->path On 2020/4/21 下午8:47, Colin King wrote: > From: Colin Ian King <colin.king@...onical.com> > > Currently the memory allocation failure check for ret->path is checking > that ret is null rather than ret->path. Fix this by checking ret->path > instead. > > Addresses-Coverity: ("Dereference null return") > Fixes: bd8bdc532152 ("btrfs: backref: introduce the skeleton of btrfs_backref_iter") > Signed-off-by: Colin Ian King <colin.king@...onical.com> My bad. Reviewed-by: Qu Wenruo <wqu@...e.com> Thanks, Qu > --- > fs/btrfs/backref.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c > index 60a69f7c0b36..78e6c9a64212 100644 > --- a/fs/btrfs/backref.c > +++ b/fs/btrfs/backref.c > @@ -2307,7 +2307,7 @@ struct btrfs_backref_iter *btrfs_backref_iter_alloc( > return NULL; > > ret->path = btrfs_alloc_path(); > - if (!ret) { > + if (!ret->path) { > kfree(ret); > return NULL; > } >
Powered by blists - more mailing lists