浏览代码

Fix configfs leak

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 15 年之前
父节点
当前提交
9b6e310211
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      fs/configfs/symlink.c

+ 3 - 1
fs/configfs/symlink.c

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