KEYS: fix key refcount leak in keyctl_read_key()
[pandora-kernel.git] / security / keys / keyctl.c
index ed50ef1..659d1cb 100644 (file)
@@ -684,7 +684,7 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen)
        if (ret == 0)
                goto can_read_key;
        if (ret != -EACCES)
-               goto error;
+               goto error2;
 
        /* we can't; see if it's searchable from this process's keyrings
         * - we automatically take account of the fact that it may be