- Security Audit fixes: freed dynamically allocated memory
This commit is contained in:
parent
f09c8c5bef
commit
5ef038939f
@ -427,6 +427,7 @@ int count = 0;
|
|||||||
dataManager.AddHost(newHostName);
|
dataManager.AddHost(newHostName);
|
||||||
}
|
}
|
||||||
retValue = dataManager.AddHostElement(newHostName, name, clearData, isPassword);
|
retValue = dataManager.AddHostElement(newHostName, name, clearData, isPassword);
|
||||||
|
free(newHostName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
retValue = dataManager.AddHostElement(hostName, name, clearData, isPassword);
|
retValue = dataManager.AddHostElement(hostName, name, clearData, isPassword);
|
||||||
@ -456,6 +457,8 @@ int count = 0;
|
|||||||
strncat(newHostName, uname, strlen(uname));
|
strncat(newHostName, uname, strlen(uname));
|
||||||
strncat(newHostName, ")", 1);
|
strncat(newHostName, ")", 1);
|
||||||
dataManager.ModifyHost(hostName, newHostName);
|
dataManager.ModifyHost(hostName, newHostName);
|
||||||
|
free(newHostName);
|
||||||
|
free(uname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user