Browse Source

TOMOYO: Fix refcount leak in tomoyo_mount_acl().

In tomoyo_mount_acl() since 2.6.36, reference to device file (e.g. /dev/sda1)
was leaking.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
Tetsuo Handa 14 năm trước cách đây
mục cha
commit
db5ca356d8
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      security/tomoyo/mount.c

+ 1 - 0
security/tomoyo/mount.c

@@ -143,6 +143,7 @@ static int tomoyo_mount_acl(struct tomoyo_request_info *r, char *dev_name,
 			goto out;
 		}
 		requested_dev_name = tomoyo_realpath_from_path(&path);
+		path_put(&path);
 		if (!requested_dev_name) {
 			error = -ENOENT;
 			goto out;