summaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2020-03-31 11:31:04 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-03-31 11:39:13 +0200
commitbf8ba6ce4c8f315c51d757fbf646e087abcaa163 (patch)
treebdd3440fb65f0b469f37501523a961a135d63145 /sources
parent26736edcd084702d9c39a359ace457b3631ddfbc (diff)
#941 memleak in actualizaConfiguracion
Missing dbi_result_free(), use syslog() for logging.
Diffstat (limited to 'sources')
-rw-r--r--sources/ogAdmServer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/ogAdmServer.c b/sources/ogAdmServer.c
index 322d2f2..9b1155c 100644
--- a/sources/ogAdmServer.c
+++ b/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