summaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2019-07-09 10:27:46 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-07-15 09:44:42 +0200
commita927e141339c6aed1018c8a58fbd40eec7e000b2 (patch)
tree03c5c9c01099768279f527d1dc55ace6d59e67e3 /sources
parent880cc90c14f5d8ffa555d12f691785e79a3d6c54 (diff)
#559 fixes memory leak in tomaConfiguracion()
Calls fclose() after fopen() to release memory.
Diffstat (limited to 'sources')
-rw-r--r--sources/ogAdmServer.cpp2
1 files changed, 2 insertions, 0 deletions
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;