@@ -253,6 +253,12 @@ static void kill_dcc_dnswait(int idx, void *x)
if (p) {
if (p->cbuf)
free(p->cbuf);
+
+ if (p->cptr)
+ free(p->cptr);
+ // free(p) is same thing here.
+ free(dcc[idx].u.other);
+ dcc[idx].u.other = NULL;
}
@@ -1035,6 +1035,8 @@ static void botlink_dns_callback(int id, void *client_data, const char *host, ch
if (valid_idx(i)) {
idx = dcc[i].u.dns->ibuf;
linker = strdup(dcc[i].u.dns->cptr);
+ free(dcc[i].u.dns->cptr);
+ dcc[i].u.dns->cptr = NULL;
if (!ips) {