ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit 55b90c418b93fad7cc93538c560ef4ee24b9f7e1
parent 21fa0a6d2049f82556433858991a0887e97e83a7
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 10 Dec 2019 11:32:18 +0100

Free SAUCE comments once and for all when exiting the program.

Diffstat:
Msrc/ansilove.c | 1+
Msrc/sauce.c | 4----
2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/ansilove.c b/src/ansilove.c @@ -315,6 +315,7 @@ main(int argc, char *argv[]) ansilove_clean(&ctx); + free(record->comment_lines); free(record); return EXIT_SUCCESS; diff --git a/src/sauce.c b/src/sauce.c @@ -107,7 +107,6 @@ readComments(FILE *file, char **comment_lines, int32_t comments) ID[sizeof (ID) - 1] = '\0'; if (strcmp(ID, COMMENT_ID) != 0) { - free(comment_lines); return -1; } @@ -120,16 +119,13 @@ readComments(FILE *file, char **comment_lines, int32_t comments) if (ferror(file) == EXIT_SUCCESS) { comment_lines[i] = strdup(buf); if (comment_lines[i] == NULL) { - free(comment_lines); return -1; } } else { - free(comment_lines); return -1; } } return 0; } - free(comment_lines); return -1; }