alec

Abstraction Layer for Escape Codes
git clone git://git.dimitrijedobrota.com/alec.git
Log | Files | Refs | README | LICENSE

commit 0cdc598bd65b3fcccb48a9537586eefa9dd577f2
parent dc75d824a5365bef24ac62baa67a30d4008c693b
Author: Dimitrije Dobrota <mail@dimitrijedobrota.com>
Date:   Fri,  1 Mar 2024 21:27:05 +0000

Fix memory leak from before and after sections

Diffstat:
MCMakeLists.txt | 2+-
Msrc/parser.y | 5++++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -3,7 +3,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) project( Alec - VERSION 1.0.0 + VERSION 1.0.1 DESCRIPTION "Abstraction Layer for Escape Codes" HOMEPAGE_URL https://git.dimitrijedobrota.com/alec.git LANGUAGES C CXX diff --git a/src/parser.y b/src/parser.y @@ -109,9 +109,12 @@ int main(const int argc, char *argv[]) { printf("%s", p->data); } - list_free(records, record_free); list_free(dupes, 0); + list_free(before, free); + list_free(records, record_free); + list_free(after, free); + yylex_destroy(); }