On 9/21/20 3:12 PM, Alex Dewar wrote:
In btrfs_destroy_inode(), the variable root may be NULL, but the check for this takes place after its value has already been dereferenced to access its fs_info member. Move the dereference operation to later in the function.Fixes: a6dbd429d8dd ("Btrfs: fix panic when trying to destroy a newly allocated") Addresses-Coverity: CID 1497103: Null pointer dereferences (REVERSE_INULL) Signed-off-by: Alex Dewar <[email protected]>
Reviewed-by: Josef Bacik <[email protected]> Thanks, Josef

