X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=discover%2Fboot.c;h=0d3491fd6cb4a61ece94b3bb5c700ff36cb69841;hb=79f738d13fa491abac82c77ac42f59aef4217b1d;hp=6e7fda6559caaa873dd99520d5e1cd68398b89bb;hpb=a5dad9c05cd72820e64e0461889e9e77eaf8202d;p=petitboot diff --git a/discover/boot.c b/discover/boot.c index 6e7fda6..0d3491f 100644 --- a/discover/boot.c +++ b/discover/boot.c @@ -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; }