1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00

Use more automatic memory management in nmap_dns.cc.

This commit is contained in:
david
2013-01-25 06:26:23 +00:00
parent c11ceacc1f
commit 6784954eee
5 changed files with 75 additions and 132 deletions

View File

@@ -348,7 +348,7 @@ const struct in6_addr *Target::v6sourceip() const {
/* You can set to NULL to erase a name or if it failed to resolve -- or
just don't call this if it fails to resolve */
void Target::setHostName(char *name) {
void Target::setHostName(const char *name) {
char *p;
if (hostname) {
free(hostname);