From: Ted Lemon Date: Wed, 12 Jun 1996 23:51:17 +0000 (+0000) Subject: Don't free old DNS buffer if there wasn't one X-Git-Tag: BETA_4_5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b170e0d3280bbb7d045dca1cda16d0b3ca605c8;p=thirdparty%2Fdhcp.git Don't free old DNS buffer if there wasn't one --- 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; }