]> git.ozlabs.org Git - petitboot/blobdiff - discover/boot.c
ui/ncurses: Interpret left/right keys as up/down
[petitboot] / discover / boot.c
index 6e7fda6559caaa873dd99520d5e1cd68398b89bb..0d3491fd6cb4a61ece94b3bb5c700ff36cb69841 100644 (file)
@@ -177,7 +177,7 @@ static void boot_hook_update(struct boot_task *task, const char *hookname,
                char *buf)
 {
        char *line, *name, *val, *sep;
-       char *saveptr;
+       char *saveptr = NULL;
 
        for (;; buf = NULL) {
 
@@ -486,9 +486,10 @@ struct boot_task *boot(void *ctx, struct discover_boot_option *opt,
          || start_url_load(boot_task, "initrd", initrd, &boot_task->initrd)
          || start_url_load(boot_task, "dtb", dtb, &boot_task->dtb);
 
-       /* If all URLs are local, we may be done. */
        if (rc) {
-               talloc_free(boot_task);
+               /* Don't call boot_cancel() to preserve the status update */
+               boot_task->cancelled = true;
+               cleanup_cancellations(boot_task, NULL);
                return NULL;
        }