vfs: fix double put after complete_walk()
[pandora-kernel.git] / fs / namei.c
index b8344d0..9680cef 100644 (file)
@@ -2238,7 +2238,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
        /* Why this, you ask?  _Now_ we might have grown LOOKUP_JUMPED... */
        error = complete_walk(nd);
        if (error)
-               goto exit;
+               return ERR_PTR(error);
        error = -EISDIR;
        if (S_ISDIR(nd->inode->i_mode))
                goto exit;