Skip to content

Commit 248c944

Browse files
Dan Carpenterdhowells
authored andcommitted
afs: Fix a use after free in afs_xattr_get_acl()
The "op" pointer is freed earlier when we call afs_put_operation(). Fixes: e49c7b2 ("afs: Build an abstraction around an "operation" concept") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Howells <dhowells@redhat.com> cc: Colin Ian King <colin.king@canonical.com>
1 parent acc080d commit 248c944

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/afs/xattr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static int afs_xattr_get_acl(const struct xattr_handler *handler,
8585
if (acl->size <= size)
8686
memcpy(buffer, acl->data, acl->size);
8787
else
88-
op->error = -ERANGE;
88+
ret = -ERANGE;
8989
}
9090
}
9191

0 commit comments

Comments
 (0)