Commit a5959bc0 authored by Thomas Meyer's avatar Thomas Meyer Committed by Josef Bacik

Btrfs: Cocci spatch "memdup.spatch"

Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent 97a184fe
......@@ -3422,10 +3422,9 @@ static int __find_xattr(int num, struct btrfs_key *di_key,
strncmp(name, ctx->name, name_len) == 0) {
ctx->found_idx = num;
ctx->found_data_len = data_len;
ctx->found_data = kmalloc(data_len, GFP_NOFS);
ctx->found_data = kmemdup(data, data_len, GFP_NOFS);
if (!ctx->found_data)
return -ENOMEM;
memcpy(ctx->found_data, data, data_len);
return 1;
}
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment