WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] fix build error in libxl
From: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>
Date: Thu, 23 Dec 2010 10:08:38 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Keir Fraser <keir@xxxxxxx>
Delivery-date: Wed, 22 Dec 2010 18:10:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuiRk/Z63AtOzpUQimgu61Fg1EHCw==
Thread-topic: [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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fix build error in libxl, Zhang, Yang Z <=