Fix configfs leak
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 14 Jan 2010 03:10:57 +0000 (22:10 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 14 Jan 2010 14:05:42 +0000 (09:05 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/configfs/symlink.c

index c8afa6b1d91d67e73266c2e3287c63f23c9d1be9..32a5f46b11578d2f0b319379cc8f2b940508a2f4 100644 (file)
@@ -121,8 +121,10 @@ static int get_target(const char *symname, struct path *path,
                                ret = -ENOENT;
                                path_put(path);
                        }
-               } else
+               } else {
                        ret = -EPERM;
+                       path_put(path);
+               }
        }
 
        return ret;