]> git.baikalelectronics.ru Git - kernel.git/commit
keys: ensure that ->match_free() is called in request_key_and_link()
authorEric Biggers <ebiggers@google.com>
Fri, 30 Aug 2019 15:52:26 +0000 (16:52 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Aug 2019 18:10:55 +0000 (11:10 -0700)
commit1aefd5566d168b3d3d6ac29fd7634b941483c967
tree7978fd3878ea066d07ebde04a059ac9b3faff3c3
parente25e2b49656c591df99d74b8a78ed2a3322f2889
keys: ensure that ->match_free() is called in request_key_and_link()

If check_cached_key() returns a non-NULL value, we still need to call
key_type::match_free() to undo key_type::match_preparse().

Fixes: c6e8567fd18a ("keys: Cache result of request_key*() temporarily in task_struct")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
security/keys/request_key.c