Skip to content

Commit

Permalink
afs: Fix key ref leak in afs_put_operation()
Browse files Browse the repository at this point in the history
The afs_put_operation() function needs to put the reference to the key
that's authenticating the operation.

Fixes: e49c7b2 ("afs: Build an abstraction around an "operation" concept")
Reported-by: Dave Botsch <[email protected]>
Signed-off-by: David Howells <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dhowells authored and torvalds committed Aug 20, 2020
1 parent 7eac66d commit ba8e420
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/afs/fs_operation.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ int afs_put_operation(struct afs_operation *op)
afs_end_cursor(&op->ac);
afs_put_serverlist(op->net, op->server_list);
afs_put_volume(op->net, op->volume, afs_volume_trace_put_put_op);
key_put(op->key);
kfree(op);
return ret;
}
Expand Down

0 comments on commit ba8e420

Please sign in to comment.