- Security Audit fixes: freed dynamically allocated memory

This commit is contained in:
smanojna 2006-12-14 21:43:50 +00:00
parent f09c8c5bef
commit 5ef038939f

View File

@ -427,6 +427,7 @@ int count = 0;
dataManager.AddHost(newHostName);
}
retValue = dataManager.AddHostElement(newHostName, name, clearData, isPassword);
free(newHostName);
}
else
retValue = dataManager.AddHostElement(hostName, name, clearData, isPassword);
@ -456,6 +457,8 @@ int count = 0;
strncat(newHostName, uname, strlen(uname));
strncat(newHostName, ")", 1);
dataManager.ModifyHost(hostName, newHostName);
free(newHostName);
free(uname);
}
}