]> git.ozlabs.org Git - petitboot/commit
discover: fix segfault on failed boot image load
authorJeremy Kerr <jk@ozlabs.org>
Thu, 1 Aug 2013 07:25:53 +0000 (15:25 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 1 Aug 2013 07:25:53 +0000 (15:25 +0800)
commitf9a63d3a640cb30a12598cedc0dd7d8b6fc5b4de
tree47d82328de01477ea48098c3c003d2275a526d1c
parent404c07fc44449be7b011d1961280ef9c96e0760d
discover: fix segfault on failed boot image load

If the boot image fails to load, we end up calling talloc_free on an
unitialised are of stack (boot_task.local_initrd).

Move the initialisers a little earlier, so we always NULL pointers
before potentially freeing.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/boot.c