diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-05-17 14:45:41 +0100 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-05-17 14:45:41 +0100 |
commit | a836d6543e0b417e147f01950e4fccfdc87fc449 (patch) | |
tree | 55e9c83b90ab607270a3ecaae8ee9a02a1be0d9c /tools/libxl/libxl_event.c | |
parent | 79d00fc950e952a06fa986af6c58341705f06fac (diff) | |
download | xen-a836d6543e0b417e147f01950e4fccfdc87fc449.tar.gz xen-a836d6543e0b417e147f01950e4fccfdc87fc449.tar.bz2 xen-a836d6543e0b417e147f01950e4fccfdc87fc449.zip |
libxl: Do not use-after-free on ao progress reporting
We need to call libxl__free_all after egc_run_callbacks since some of
the callbacks might be ao progress reports allocated from the egc's
gc.
Fixes a segfault in egc_run_callbacks.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_event.c')
-rw-r--r-- | tools/libxl/libxl_event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c index 350e846aa4..7fbd5c3702 100644 --- a/tools/libxl/libxl_event.c +++ b/tools/libxl/libxl_event.c @@ -988,9 +988,9 @@ static void egc_run_callbacks(libxl__egc *egc) void libxl__egc_cleanup(libxl__egc *egc) { EGC_GC; - libxl__free_all(gc); - egc_run_callbacks(egc); + + libxl__free_all(gc); } /* |