diff --git a/stb_c_lexer.h b/stb_c_lexer.h index e91c6c3..efb8f94 100644 --- a/stb_c_lexer.h +++ b/stb_c_lexer.h @@ -798,6 +798,8 @@ int main(int argc, char **argv) stb_lexer lex; if (len < 0) { fprintf(stderr, "Error opening file\n"); + free(text); + fclose(f); return 1; } fclose(f);