summaryrefslogtreecommitdiffstats
path: root/ipc/mq_sysctl.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-09-21 13:57:40 -0700
committerDavid Howells <dhowells@redhat.com>2017-09-25 15:03:55 +0100
commit44d8143340a99b167c74365e844516b73523c087 (patch)
treea5f1901a9c6323577946f36885f2dc81ec807416 /ipc/mq_sysctl.c
parentebb2c2437d8008d46796902ff390653822af6cc4 (diff)
downloadlinux-44d8143340a99b167c74365e844516b73523c087.tar.bz2
KEYS: fix cred refcount leak in request_key_auth_new()
In request_key_auth_new(), if key_alloc() or key_instantiate_and_link() were to fail, we would leak a reference to the 'struct cred'. Currently this can only happen if key_alloc() fails to allocate memory. But it still should be fixed, as it is a more severe bug waiting to happen. Fix it by cleaning things up to use a helper function which frees a 'struct request_key_auth' correctly. Fixes: d84f4f992cbd ("CRED: Inaugurate COW credentials") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'ipc/mq_sysctl.c')
0 files changed, 0 insertions, 0 deletions