#580 Fix uninitialized variables in ogAdmServer

This patch ensures that some variables are initialized before using them.
master
Roberto Hueso Gómez 2019-12-11 10:45:18 +01:00 committed by OpenGnSys Support Team
parent ad2d308436
commit 1c0eaf2fa6
1 changed files with 6 additions and 1 deletions

View File

@ -1961,6 +1961,8 @@ 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);
@ -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) {