summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
404c07f)
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>
+ boot_task.local_initrd = NULL;
+ boot_task.local_dtb = NULL;
+
update_status(status_fn, status_arg, BOOT_STATUS_INFO,
"loading kernel");
boot_task.local_image = load_url(NULL, image, &clean_image);
update_status(status_fn, status_arg, BOOT_STATUS_INFO,
"loading kernel");
boot_task.local_image = load_url(NULL, image, &clean_image);
- boot_task.local_initrd = NULL;
if (initrd) {
update_status(status_fn, status_arg, BOOT_STATUS_INFO,
"loading initrd");
if (initrd) {
update_status(status_fn, status_arg, BOOT_STATUS_INFO,
"loading initrd");
- boot_task.local_dtb = NULL;
if (dtb) {
update_status(status_fn, status_arg, BOOT_STATUS_INFO,
"loading device tree");
if (dtb) {
update_status(status_fn, status_arg, BOOT_STATUS_INFO,
"loading device tree");