aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/kwbimage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index c0f1bdac021..a5b518f60bc 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -2029,6 +2029,10 @@ static int kwbimage_generate(struct image_tool_params *params,
case 1:
alloc_len = image_headersz_v1(NULL);
+ if (!alloc_len) {
+ free(image_cfg);
+ exit(EXIT_FAILURE);
+ }
break;
default: