From: Dan Carpenter Date: Fri, 15 Sep 2023 12:55:40 +0000 (+0300) Subject: bcachefs: acl: Uninitialized variable in bch2_acl_chmod() X-Git-Tag: v6.7-rc1~201^2~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9a0a26ed05a93034f3d49374dd5ef943db2d5b7;p=thirdparty%2Flinux.git bcachefs: acl: Uninitialized variable in bch2_acl_chmod() The clean up code at the end of the function uses "acl" so it needs to be initialized to NULL. Fixes: 53306e096d91 ("bcachefs: Always check for transaction restarts") Signed-off-by: Dan Carpenter Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/acl.c b/fs/bcachefs/acl.c index 9653401957b32..6b1579e96dfe1 100644 --- a/fs/bcachefs/acl.c +++ b/fs/bcachefs/acl.c @@ -417,7 +417,7 @@ int bch2_acl_chmod(struct btree_trans *trans, subvol_inum inum, struct btree_iter iter; struct bkey_s_c_xattr xattr; struct bkey_i_xattr *new; - struct posix_acl *acl; + struct posix_acl *acl = NULL; struct bkey_s_c k; int ret;