Skip to contentSkip to conversation

libxl: Fix not initialized variable

PATCH Applied Marek Marczykowski 2 participants 2 messages Feb 24, 2013 – Feb 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: Fix not initialized variable

# HG changeset patch
# User Marek Marczykowski <[email protected]> # Date 1361668098 -3600
# Node ID 9f7e5ef02139a2e1844e39844f1230c5ee899cc8 # Parent 9f12bdd6b7f00e421f963775a80429c0f0c1740a
libxl: Fix not initialized variable

It is used for result domid from libxl__domain_make, but actually this function have assert on an initial value.

This patch is intended for xen-4.1 only - 4.2 and later have reworked this part of code already containing the fix.

tools/libxl/libxl_dm.c +1 -1
@@ -458,7 +458,7 @@ static int libxl_create_stubdom(libxl_ct
     libxl_domain_create_info c_info;
     libxl_domain_build_info b_info;
     libxl_domain_build_state state;
-    uint32_t domid;
+    uint32_t domid = 0;
     char **args;
     struct xs_permissions perm[2];
     xs_transaction_t t;
Applied
#1 lore raw

Marek Marczykowski writes ("[Xen-devel] [PATCH] libxl: Fix not initialized variable"):

Quoted 7 lines

libxl: Fix not initialized variable

It is used for result domid from libxl__domain_make, but actually this function have assert on an initial value.

This patch is intended for xen-4.1 only - 4.2 and later have reworked this part of code already containing the fix.

Applied to 4.1-staging, thanks.

Ian.