summaryrefslogtreecommitdiff
path: root/util/cbfstool/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/common.c')
-rw-r--r--util/cbfstool/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index cdc04f333e..8773fe49c8 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -87,6 +87,7 @@ int buffer_from_file(struct buffer *buffer, const char *filename)
if (fread(buffer->data, 1, buffer->size, fp) != buffer->size) {
fprintf(stderr, "incomplete read: %s\n", filename);
fclose(fp);
+ buffer_delete(buffer);
return -1;
}
fclose(fp);