security: introduce missing kfree
authorVegard Nossum <vegard.nossum@gmail.com>
Sat, 17 Jan 2009 16:45:45 +0000 (17:45 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 17 Jan 2009 22:24:46 +0000 (14:24 -0800)
Plug this leak.

Acked-by: David Howells <dhowells@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: <stable@kernel.org>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
security/keys/keyctl.c

index e9335e1c6cf50726b3d18f67e069f285a8e5b84e..b1ec3b4ee17df919101b3aee3e3853f4b4ea75bb 100644 (file)
@@ -270,6 +270,7 @@ long keyctl_join_session_keyring(const char __user *_name)
 
        /* join the session */
        ret = join_session_keyring(name);
+       kfree(name);
 
  error:
        return ret;