Merge branch 'akpm' (patches from Andrew)
[linux-2.6-microblaze.git] / arch / arm64 / kernel / machine_kexec_file.c
index 03210f6..0cde47a 100644 (file)
@@ -182,8 +182,10 @@ static int create_dtb(struct kimage *image,
 
                /* duplicate a device tree blob */
                ret = fdt_open_into(initial_boot_params, buf, buf_size);
-               if (ret)
+               if (ret) {
+                       vfree(buf);
                        return -EINVAL;
+               }
 
                ret = setup_dtb(image, initrd_load_addr, initrd_len,
                                cmdline, buf);