virtio-9p: fix windows build error that is due to qemu 2.0 merge. 50/20850/1
authorSooyoung Ha <yoosah.ha@samsung.com>
Tue, 13 May 2014 07:34:07 +0000 (16:34 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Tue, 13 May 2014 07:34:07 +0000 (16:34 +0900)
Change-Id: I63dfd087c6935c5c5d33990964035fb0a3cdd706
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
hw/9pfs/virtio-9p-local-maru.c
hw/9pfs/virtio-9p-xattr.h

index 3a265a0..c7fa109 100644 (file)
@@ -639,9 +639,9 @@ static ssize_t local_pwritev(FsContext *ctx, V9fsFidOpenState *fs,
 static int local_chmod(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)
 {
     TRACE("[%d][ Enter >> %s]\n", __LINE__, __func__);
+    int ret = -1;
 #ifndef CONFIG_WIN32
     char *buffer;
-    int ret = -1;
     char *path = fs_path->data;
     buffer = rpath(fs_ctx, path);
 
index 770fc8b..d83890f 100644 (file)
@@ -126,11 +126,11 @@ static inline int pt_removexattr(FsContext *ctx,
 #else
     ret = removexattr(path, name, XATTR_NOFOLLOW);
 #endif
+    g_free(buffer);
+    return ret;
 #else
     return 0;
 #endif
-    g_free(buffer);
-    return ret;
 #else
     char *buffer;
     int ret;