+ image_number = fdtdec_get_child_count(fdt, images);
+
+ /*
+ * Allocate space to hold the image data we will extract,
+ * extral space allocate for image alignment to prevent overflow.
+ */
+ buf = malloc(fit_size + (align_size * image_number));
+ if (!buf) {
+ ret = -ENOMEM;
+ goto err_munmap;
+ }
+ buf_ptr = 0;