From 535704cd3d1a1c99c2db3c89a91feebba61871f6 Mon Sep 17 00:00:00 2001 From: Kitae Kim Date: Fri, 23 May 2014 11:31:43 +0900 Subject: [PATCH] virtio-9p: fix wrong control flow mp_dacl_setxattr function was returned before releasing a buffer. Change-Id: Id81ea87389408bafd3a4ee5e08c71d6cd2c98e98 Signed-off-by: Kitae Kim --- hw/9pfs/virtio-9p-posix-acl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c index 027c0b7523..7e154d043f 100644 --- a/hw/9pfs/virtio-9p-posix-acl.c +++ b/hw/9pfs/virtio-9p-posix-acl.c @@ -144,10 +144,10 @@ static int mp_dacl_setxattr(FsContext *ctx, const char *path, const char *name, buffer = rpath(ctx, path); #ifdef CONFIG_LINUX - return lsetxattr(buffer, MAP_ACL_DEFAULT, value, + ret = lsetxattr(buffer, MAP_ACL_DEFAULT, value, size, flags); #else - return setxattr(buffer, MAP_ACL_DEFAULT, value, + ret = setxattr(buffer, MAP_ACL_DEFAULT, value, size, 0, flags | XATTR_NOFOLLOW); #endif g_free(buffer); -- 2.34.1