]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't free old DNS buffer if there wasn't one
authorTed Lemon <source@isc.org>
Wed, 12 Jun 1996 23:51:17 +0000 (23:51 +0000)
committerTed Lemon <source@isc.org>
Wed, 12 Jun 1996 23:51:17 +0000 (23:51 +0000)
common/tree.c
tree.c

index 49f629261a011f78333ad89907b805bca42dfc08..a9270f2f7a2183fa1a37329c08b47a2ea777bb1a 100644 (file)
@@ -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 49f629261a011f78333ad89907b805bca42dfc08..a9270f2f7a2183fa1a37329c08b47a2ea777bb1a 100644 (file)
--- 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;
                }