mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
image_version_file()'s only use is to return the version number of the specified image, and it's only called by kwbimage_generate(). This version function mallocs "image_cfg" and reads the contents of the image into that buffer. Before return to its caller it frees the buffer. After extracting the version, kwb_image_generate() tries to calculate the header size by calling image_headersz_v1(). This function now accesses "image_cfg", which has already been freed. Since image_version_file() is only used by a single function, inline it into kwbimage_generate() and only free the buffer after it is no longer needed. This also improves code readability since the code is mostly equal to kwbimage_set_header(). Signed-off-by: Patrick Wildt <patrick@blueri.se> Signed-off-by: Stefan Roese <sr@denx.de> |
||
|---|---|---|
| .. | ||
| binman | ||
| buildman | ||
| dtoc | ||
| easylogo | ||
| env | ||
| gdb | ||
| kermit | ||
| logos | ||
| omap | ||
| patman | ||
| scripts | ||
| tbot | ||
| .gitignore | ||
| aisimage.c | ||
| aisimage.h | ||
| atmel_pmecc_params.c | ||
| atmelimage.c | ||
| bmp_logo.c | ||
| default_image.c | ||
| dumpimage.c | ||
| dumpimage.h | ||
| envcrc.c | ||
| fdt_host.h | ||
| fdtgrep.c | ||
| fit_check_sign.c | ||
| fit_common.c | ||
| fit_common.h | ||
| fit_image.c | ||
| fit_info.c | ||
| gen_eth_addr.c | ||
| gen_ethaddr_crc.c | ||
| genboardscfg.py | ||
| getline.c | ||
| getline.h | ||
| gpheader.h | ||
| gpimage-common.c | ||
| gpimage.c | ||
| ifdtool.c | ||
| ifdtool.h | ||
| image-host.c | ||
| imagetool.c | ||
| imagetool.h | ||
| img2brec.sh | ||
| img2srec.c | ||
| imximage.c | ||
| imximage.h | ||
| jtagconsole | ||
| kwbimage.c | ||
| kwbimage.h | ||
| kwboot.c | ||
| lpc32xximage.c | ||
| Makefile | ||
| microcode-tool | ||
| microcode-tool.py | ||
| mingw_support.c | ||
| mingw_support.h | ||
| mkenvimage.c | ||
| mkexynosspl.c | ||
| mkimage.c | ||
| mkimage.h | ||
| mksunxiboot.c | ||
| moveconfig.py | ||
| mxsboot.c | ||
| mxsimage.c | ||
| mxsimage.h | ||
| ncb.c | ||
| netconsole | ||
| omapimage.c | ||
| omapimage.h | ||
| os_support.c | ||
| os_support.h | ||
| pbl_crc32.c | ||
| pbl_crc32.h | ||
| pblimage.c | ||
| pblimage.h | ||
| proftool.c | ||
| relocate-rela.c | ||
| rkcommon.c | ||
| rkcommon.h | ||
| rkimage.c | ||
| rkmux.py | ||
| rksd.c | ||
| rkspi.c | ||
| socfpgaimage.c | ||
| sunxi-spl-image-builder.c | ||
| ublimage.c | ||
| ublimage.h | ||
| ubsha1.c | ||
| vybridimage.c | ||
| xway-swap-bytes.c | ||
| zynqimage.c | ||
| zynqmpimage.c | ||