aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--driver.c3
-rw-r--r--options.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/driver.c b/driver.c
index 56fc93f1..9d624b81 100644
--- a/driver.c
+++ b/driver.c
@@ -1007,6 +1007,7 @@ static int do_session(
goto closeUp;
}
+ xfree(ctl->server.truename);
ctl->server.truename = xstrdup(leadname);
}
else
@@ -1033,9 +1034,11 @@ static int do_session(
}
else
{
+ xfree(ctl->server.truename);
ctl->server.truename=xstrdup(res->ai_canonname);
ctl->server.trueaddr=xmalloc(res->ai_addrlen);
memcpy(ctl->server.trueaddr, res->ai_addr, res->ai_addrlen);
+ freeaddrinfo(res);
}
#else
struct hostent *namerec;
diff --git a/options.c b/options.c
index 6d70bd60..01c64b6b 100644
--- a/options.c
+++ b/options.c
@@ -322,6 +322,7 @@ struct query *ctl; /* option record to be initialized */
break;
case 'f':
case LA_RCFILE:
+ xfree(rcfile);
rcfile = prependdir (optarg, currentwd);
break;
case 'i':