From 3b170e0d3280bbb7d045dca1cda16d0b3ca605c8 Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Wed, 12 Jun 1996 23:51:17 +0000 Subject: [PATCH] Don't free old DNS buffer if there wasn't one --- common/tree.c | 3 ++- tree.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/tree.c b/common/tree.c index 49f629261..a9270f2f7 100644 --- a/common/tree.c +++ b/common/tree.c @@ -356,7 +356,8 @@ static TIME do_host_lookup (bufix, bufp, bufcount, dns) return dns -> timeout; } } else { - dfree (dns -> data, "do_host_lookup"); + if (dns -> data) + dfree (dns -> data, "do_host_lookup"); dns -> data = buf; dns -> buf_len = new_len; } diff --git a/tree.c b/tree.c index 49f629261..a9270f2f7 100644 --- a/tree.c +++ b/tree.c @@ -356,7 +356,8 @@ static TIME do_host_lookup (bufix, bufp, bufcount, dns) return dns -> timeout; } } else { - dfree (dns -> data, "do_host_lookup"); + if (dns -> data) + dfree (dns -> data, "do_host_lookup"); dns -> data = buf; dns -> buf_len = new_len; } -- 2.47.3