diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-03-31 11:31:04 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-03-31 11:39:13 +0200 |
commit | 9bdd4aa13dd8601a517334bf653da07237d465f7 (patch) | |
tree | 880c648aada2a1ea7be0cef2cc1f41f562e12227 /admin | |
parent | 9cf5bf7181a0e60e17514ed5075d628b1b04b22e (diff) |
#941 memleak in actualizaConfiguracion
Missing dbi_result_free(), use syslog() for logging.
Diffstat (limited to 'admin')
-rw-r--r-- | admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c index 322d2f28..9b1155c8 100644 --- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c +++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c @@ -528,9 +528,11 @@ bool actualizaConfiguracion(struct og_dbi *dbi, char *cfg, int ido) ser, ido); if (!result) { dbi_conn_error(dbi->conn, &msglog); - og_info((char *)msglog); + syslog(LOG_ERR, "failed to query database (%s:%d) %s\n", + __func__, __LINE__, msglog); return false; } + dbi_result_free(result); } continue; } @@ -595,7 +597,8 @@ bool actualizaConfiguracion(struct og_dbi *dbi, char *cfg, int ido) ido, disk, par, cpt, tam, uso, idsfi, idsoi); if (!result_update) { dbi_conn_error(dbi->conn, &msglog); - og_info((char *)msglog); + syslog(LOG_ERR, "failed to query database (%s:%d) %s\n", + __func__, __LINE__, msglog); return false; } dbi_result_free(result_update); @@ -643,6 +646,7 @@ bool actualizaConfiguracion(struct og_dbi *dbi, char *cfg, int ido) dbi_result_free(result_update); } + dbi_result_free(result); } lon += sprintf(tbPar + lon, "(0,0)"); // Eliminar particiones almacenadas que ya no existen |