diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-09-19 21:07:19 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-09-19 21:36:33 +0800 |
commit | 4926cde5c97d09794ec33cca1321bb05a8d43304 (patch) | |
tree | bf09d5e3066cdc672a9b098888a3189d9a7a8b5d /discover/boot.c | |
parent | c109a4d1bfbe3016c1380c7b0a836a319aa0cf23 (diff) | |
download | talos-petitboot-4926cde5c97d09794ec33cca1321bb05a8d43304.tar.gz talos-petitboot-4926cde5c97d09794ec33cca1321bb05a8d43304.zip |
discover/boot: Fix use-after-free in boot()
We need boot_task for kexec_reboot.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/boot.c')
-rw-r--r-- | discover/boot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discover/boot.c b/discover/boot.c index 8ad83be..e7a72d4 100644 --- a/discover/boot.c +++ b/discover/boot.c @@ -371,8 +371,6 @@ no_load: if (clean_dtb) unlink(boot_task->local_dtb); - talloc_free(boot_task); - if (!result) { update_status(status_fn, status_arg, BOOT_STATUS_INFO, "performing kexec reboot"); @@ -385,5 +383,7 @@ no_load: } } + talloc_free(boot_task); + return result; } |