diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-12-11 10:45:18 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-03-07 13:22:56 +0100 |
commit | 1c0eaf2fa64b16e6ed829745ba92b85d8dd328f8 (patch) | |
tree | 87cf5d20d2a66201b2443bca223b31fe9844a474 /sources/ogAdmServer.c | |
parent | ad2d308436190aeb70cc04a313c228fe9e8f778a (diff) |
#580 Fix uninitialized variables in ogAdmServer
This patch ensures that some variables are initialized before using them.
Diffstat (limited to 'sources/ogAdmServer.c')
-rw-r--r-- | sources/ogAdmServer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sources/ogAdmServer.c b/sources/ogAdmServer.c index 562a39d..fa8b487 100644 --- a/sources/ogAdmServer.c +++ b/sources/ogAdmServer.c @@ -1961,7 +1961,9 @@ static bool RESPUESTA_InventarioHardware(TRAMA* ptrTrama, struct og_client *cli) if (buffer) res=actualizaHardware(dbi, buffer, ido, npc, idc); - + else + res = false; + liberaMemoria(iph); liberaMemoria(ido); liberaMemoria(npc); @@ -2290,6 +2292,8 @@ static bool RESPUESTA_InventarioSoftware(TRAMA* ptrTrama, struct og_client *cli) buffer = rTrim(leeArchivo(sft)); if (buffer) res=actualizaSoftware(dbi, buffer, par, ido, npc, idc); + else + res = false; liberaMemoria(iph); liberaMemoria(ido); @@ -2366,6 +2370,7 @@ bool actualizaSoftware(struct og_dbi *dbi, char *sft, char *par,char *ido, if (lon > MAXSOFTWARE) lon = MAXSOFTWARE; // Limita el número de componentes software + idnombreso = 0; for (i = 0; i < lon; i++) { // Primera línea es el sistema operativo: se obtiene identificador if (i == 0) { |