debuggers.hg

changeset 22698:77f1af42ca39

libxl: fix free of uninitialised "disks" variable

Reported-by: Wei Huang <wei.huang2@amd.com>
Reported-by: Christoph Egger <Christoph.Egger@amd.com>
Author: Yang Z Zhang <yang.z.zhang@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Yang Z Zhang <yang.z.zhang@intel.com>
date Wed Jan 05 23:37:32 2011 +0000 (2011-01-05)
parents e0db3784a4a2
children 7b4c82f07281
files tools/libxl/libxl.c
line diff
     1.1 --- a/tools/libxl/libxl.c	Wed Jan 05 23:31:24 2011 +0000
     1.2 +++ b/tools/libxl/libxl.c	Wed Jan 05 23:37:32 2011 +0000
     1.3 @@ -1402,8 +1402,8 @@ static char ** libxl_build_device_model_
     1.4              }
     1.5              libxl_device_disk_destroy(&disks[i]);
     1.6          }
     1.7 +        free(disks);
     1.8      }
     1.9 -    free(disks);
    1.10      flexarray_set(dm_args, num++, NULL);
    1.11      return (char **) flexarray_contents(dm_args);
    1.12  }