security: introduce missing kfree
authorVegard Nossum <[email protected]>
Sat, 17 Jan 2009 16:45:45 +0000 (17:45 +0100)
committerLinus Torvalds <[email protected]>
Sat, 17 Jan 2009 22:24:46 +0000 (14:24 -0800)
Plug this leak.

Acked-by: David Howells <[email protected]>
Cc: James Morris <[email protected]>
Cc: <[email protected]>
Signed-off-by: Vegard Nossum <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
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;