tools/ocaml: fix erroneous free of cpumap in stub_xc_vcpu_getaffinity
authorMatthew Daley <mattjd@gmail.com>
Tue, 10 Sep 2013 11:12:45 +0000 (23:12 +1200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 10 Oct 2013 14:49:40 +0000 (15:49 +0100)
Not sure how it got there...

Coverity-ID: 1056196

This is CVE-2013-4370 / XSA-69

Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/ocaml/libs/xc/xenctrl_stubs.c

index df756ad539aa7753cd1c6485de693561fb17fbb9..f5cf0edb241c61f09542c0a579fe47b95ed05722 100644 (file)
@@ -461,8 +461,6 @@ CAMLprim value stub_xc_vcpu_getaffinity(value xch, value domid,
 
        retval = xc_vcpu_getaffinity(_H(xch), _D(domid),
                                     Int_val(vcpu), c_cpumap);
-       free(c_cpumap);
-
        if (retval < 0) {
                free(c_cpumap);
                failwith_xc(_H(xch));