]> git.ozlabs.org Git - petitboot/blobdiff - discover/boot.c
discover: don't free cancelled load tasks
[petitboot] / discover / boot.c
index e5803a76dcf0fbc228f2c426b19c415c28d382ef..ce9c1e099f071d51245b8610e90db514fcb7a29b 100644 (file)
@@ -340,6 +340,11 @@ static void cleanup_cancellations(struct boot_task *task,
                } else if (result->status == LOAD_ASYNC) {
                        load_url_async_cancel(result);
                        pending = true;
                } 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;
                }
        }
 
                }
        }