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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 24 Mar 2021 08:58:26 -0500
From:   Connor Kuehl <ckuehl@...hat.com>
To:     zhouchuangao <zhouchuangao@...o.com>,
        Vivek Goyal <vgoyal@...hat.com>,
        Stefan Hajnoczi <stefanha@...hat.com>,
        Miklos Szeredi <miklos@...redi.hu>,
        virtualization@...ts.linux-foundation.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/fuse/virtio_fs: Fix a potential memory allocation
 failure

On 3/24/21 7:38 AM, zhouchuangao wrote:
> Allocate memory for struct fuse_conn may fail, we should not jump to
> out_err to kfree(fc).

Why not? If fc's allocation fails then it is NULL and calling kfree() on 
a NULL pointer is a noop[1].

Connor

[1] 
https://www.kernel.org/doc/html/latest/core-api/mm-api.html?highlight=kfree#c.kfree

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ