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 c8afa6b..32a5f46 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;