commit 770b91cc0313e0aad126774acced198e2507d67e parent a6f586e77076f631197330370f1b8cc4204f5351 Author: Frederic Cambus <fred@statdns.com> Date: Wed, 31 Oct 2018 22:01:38 +0100 Free the IDF buffer if realloc fails Diffstat:
M | src/loaders/icedraw.c | | | 2 | ++ |
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/loaders/icedraw.c b/src/loaders/icedraw.c @@ -70,6 +70,8 @@ int ansilove_icedraw(struct ansilove_ctx *ctx, struct ansilove_options *options) idf_buffer = temp; } else { ctx->error = ANSILOVE_MEMORY_ERROR; + free(idf_buffer); + idf_buffer = NULL; return -1; }