[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] fix build error in libxl



Move free(disks) into the bracket, or it will show error 'disks' used 
uninitialized when build libxl.

best regards
yang

diff -r f69037cc4674 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Wed Dec 22 17:48:31 2010 +0000
+++ b/tools/libxl/libxl.c       Thu Dec 23 10:03:35 2010 +0800
@@ -1402,8 +1402,8 @@
             }
             libxl_device_disk_destroy(&disks[i]);
         }
+        free(disks);
     }
-    free(disks);
     flexarray_set(dm_args, num++, NULL);
     return (char **) flexarray_contents(dm_args);
 }




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.