aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-21 21:56:37 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-21 21:56:37 +0200
commitca197d7fc187e205a0e733be1722e6e8e03515c2 (patch)
tree802f47626c267b21ca81876dbc2db63a8aa79828 /src
parent4127daa65ed8962900b386e138577a83bbc6baa5 (diff)
downloaddns-ca197d7fc187e205a0e733be1722e6e8e03515c2.tar.gz
zonefile: fix memory leak from getline
Diffstat (limited to 'src')
-rw-r--r--src/zonefile.c3
1 files changed, 3 insertions, 0 deletions
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;
}