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

[Xen-changelog] [xen-unstable] libxl: do not leak dms->saved_state


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 04 Jul 2012 04:11:24 +0000
  • Delivery-date: Wed, 04 Jul 2012 04:11:34 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
# Date 1340905407 -3600
# Node ID 470770c73af9adc33f7a3bcbf5b2c997ab1bfd51
# Parent  82e77edfa002b272f6b21d954267de091dd77531
libxl: do not leak dms->saved_state

This was allocated using asprintf but never freed.  Use GCSPRINTF.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---


diff -r 82e77edfa002 -r 470770c73af9 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Thu Jun 28 18:43:26 2012 +0100
+++ b/tools/libxl/libxl_create.c        Thu Jun 28 18:43:27 2012 +0100
@@ -807,9 +807,8 @@ void libxl__xc_domain_restore_done(libxl
         goto out;
 
     if (info->type == LIBXL_DOMAIN_TYPE_HVM) {
-        ret = asprintf(&state->saved_state,
+        state->saved_state = GCSPRINTF(
                        XC_DEVICE_MODEL_RESTORE_FILE".%d", domid);
-        ret = (ret < 0) ? ERROR_FAIL : 0;
     }
 
 out:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.