From a927e141339c6aed1018c8a58fbd40eec7e000b2 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Tue, 9 Jul 2019 10:27:46 +0200 Subject: #559 fixes memory leak in tomaConfiguracion() Calls fclose() after fopen() to release memory. --- sources/ogAdmServer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index c9b1048..1a55554 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -84,6 +84,8 @@ static bool tomaConfiguracion(const char *filecfg) line = fgets(buf, sizeof(buf), fcfg); } + fclose(fcfg); + if (!servidoradm[0]) { syslog(LOG_ERR, "Missing SERVIDORADM in configuration file\n"); return false; -- cgit v1.2.3-18-g5258