virtio-9p: fix wrong control flow 59/21559/1
authorKitae Kim <kt920.kim@samsung.com>
Fri, 23 May 2014 02:31:43 +0000 (11:31 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Fri, 23 May 2014 02:31:43 +0000 (11:31 +0900)
mp_dacl_setxattr function was returned before releasing a buffer.

Change-Id: Id81ea87389408bafd3a4ee5e08c71d6cd2c98e98
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
hw/9pfs/virtio-9p-posix-acl.c

index 027c0b7523f4292abf6db9df5b6bd9614cb4b652..7e154d043f2691a348f13425e44235a39eb2eda1 100644 (file)
@@ -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);