mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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>
This commit is contained in:
1 parent
79d00fc950
commit
a836d6543e
1 file changed
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||