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

[Xen-changelog] [xen-unstable] libxl: fix free of uninitialised "disks" variable



# HG changeset patch
# User Yang Z Zhang <yang.z.zhang@xxxxxxxxx>
# Date 1294270652 0
# Node ID 77f1af42ca396837650450e9b96338278dc439d3
# Parent  e0db3784a4a234f99ef417f4cd9377010a8d127a
libxl: fix free of uninitialised "disks" variable

Reported-by: Wei Huang <wei.huang2@xxxxxxx>
Reported-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Author: Yang Z Zhang <yang.z.zhang@xxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r e0db3784a4a2 -r 77f1af42ca39 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Wed Jan 05 23:31:24 2011 +0000
+++ b/tools/libxl/libxl.c       Wed Jan 05 23:37:32 2011 +0000
@@ -1402,8 +1402,8 @@ static char ** libxl_build_device_model_
             }
             libxl_device_disk_destroy(&disks[i]);
         }
-    }
-    free(disks);
+        free(disks);
+    }
     flexarray_set(dm_args, num++, NULL);
     return (char **) flexarray_contents(dm_args);
 }

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


 


Rackspace

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