X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fboot.c;h=ce9c1e099f071d51245b8610e90db514fcb7a29b;hp=0d61f0efc785295852c659914461bd656e4865fe;hb=2e60c988cb533dbc6c3abc63ae8b295e63dd2c0c;hpb=6c40be15d13765c004e3568cd50b543e1fb74648 diff --git a/discover/boot.c b/discover/boot.c index 0d61f0e..ce9c1e0 100644 --- a/discover/boot.c +++ b/discover/boot.c @@ -1,5 +1,7 @@ -#define _GNU_SOURCE +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif #include #include @@ -338,6 +340,11 @@ static void cleanup_cancellations(struct boot_task *task, } else if (result->status == LOAD_ASYNC) { load_url_async_cancel(result); pending = true; + + /* if we're waiting for a cancellation, we still need to + * wait for the completion before freeing the boot task */ + } else if (result->status == LOAD_CANCELLED) { + pending = true; } }