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

[Xen-changelog] [xen-unstable] libxl: do not leak an event struct on ignored ao progress


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

# HG changeset patch
# User Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
# Date 1340905408 -3600
# Node ID 01a09e818f960c5adac6183ecc7ebfabc42fbfb8
# Parent  52be3b1ae4f096cf76ddced7276cd5ef36ecbbdc
libxl: do not leak an event struct on ignored ao progress

On entry to libxl__ao_progress_report, the caller has allocated an
event.  If the progress report is to be ignored, we need to free it.

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


diff -r 52be3b1ae4f0 -r 01a09e818f96 tools/libxl/libxl_event.c
--- a/tools/libxl/libxl_event.c Thu Jun 28 18:43:27 2012 +0100
+++ b/tools/libxl/libxl_event.c Thu Jun 28 18:43:28 2012 +0100
@@ -1602,6 +1602,7 @@ void libxl__ao_progress_report(libxl__eg
     ev->for_user = how->for_event;
     if (how->callback == dummy_asyncprogress_callback_ignore) {
         LOG(DEBUG,"ao %p: progress report: ignored",ao);
+        libxl_event_free(CTX,ev);
         /* ignore */
     } else if (how->callback) {
         libxl__aop_occurred *aop = libxl__zalloc(&egc->gc, sizeof(*aop));

_______________________________________________
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®.