From ca197d7fc187e205a0e733be1722e6e8e03515c2 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 21 Sep 2021 21:56:37 +0200 Subject: zonefile: fix memory leak from getline --- src/zonefile.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/zonefile.c') diff --git a/src/zonefile.c b/src/zonefile.c index a15b374..1b0d036 100644 --- a/src/zonefile.c +++ b/src/zonefile.c @@ -137,6 +137,9 @@ int zonefile_to_database (database_t *_database, char* _file) { line = NULL; } + if(line) + free(line); + fclose(zfile); return 0; } -- cgit v1.2.3