diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-06-28 18:43:28 +0100 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-06-28 18:43:28 +0100 |
commit | 34d1cced249c2fe083968b07331baa857db60b4e (patch) | |
tree | 7b08f9ae60dbd56eabe0db27917c2021b1d825b6 /tools/libxl/libxl_event.c | |
parent | ac29cf9641e2db5f7dea35df5d049d26724a6602 (diff) | |
download | xen-34d1cced249c2fe083968b07331baa857db60b4e.tar.gz xen-34d1cced249c2fe083968b07331baa857db60b4e.tar.bz2 xen-34d1cced249c2fe083968b07331baa857db60b4e.zip |
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@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_event.c')
-rw-r--r-- | tools/libxl/libxl_event.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c index eb23a93887..19575053ff 100644 --- a/tools/libxl/libxl_event.c +++ b/tools/libxl/libxl_event.c @@ -1602,6 +1602,7 @@ void libxl__ao_progress_report(libxl__egc *egc, libxl__ao *ao, 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)); |