diff options
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/image.c b/common/image.c index 4a6402d8b9..d68889bc0f 100644 --- a/common/image.c +++ b/common/image.c @@ -290,7 +290,7 @@ void image_print_contents(const image_header_t *hdr, void *data) printf ("%sEntry Point: %08x\n", p, image_get_ep(hdr)); type = image_get_type(hdr); - if (type == IH_TYPE_MULTI || type == IH_TYPE_SCRIPT) { + if (data && (type == IH_TYPE_MULTI || type == IH_TYPE_SCRIPT)) { int i; ulong img_data, len; ulong count = image_multi_count(data); @@ -404,6 +404,7 @@ err_out: close(fd); if (handle->flags & IH_MALLOC) free(handle->data); + free(handle->data_entries); free(handle); return NULL; } |