summaryrefslogtreecommitdiff
path: root/server/mdb.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-05-02 07:09:36 +0000
committerTed Lemon <source@isc.org>2001-05-02 07:09:36 +0000
commit4d1a48ebef16903e475c979a8580cb5cd253ea24 (patch)
tree2a99ae8d1f029cc58b040e9b9615c959cc956328 /server/mdb.c
parente492a2594a3090317541252815a105597c3c0ce0 (diff)
downloadisc-dhcp-4d1a48ebef16903e475c979a8580cb5cd253ea24.tar.gz
Don't free null uid buffers.
Diffstat (limited to 'server/mdb.c')
-rw-r--r--server/mdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/mdb.c b/server/mdb.c
index 447838c7..7c3c1db0 100644
--- a/server/mdb.c
+++ b/server/mdb.c
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: mdb.c,v 1.66 2001/04/30 22:38:34 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: mdb.c,v 1.67 2001/05/02 07:09:36 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -1376,7 +1376,7 @@ void abandon_lease (lease, message)
log_error ("Abandoning IP address %s: %s",
piaddr (lease -> ip_addr), message);
lt -> hardware_addr.hlen = 0;
- if (lt -> uid != lt -> uid_buf)
+ if (lt -> uid && lt -> uid != lt -> uid_buf)
dfree (lt -> uid, MDL);
lt -> uid = (unsigned char *)0;
lt -> uid_len = 0;
@@ -1407,7 +1407,7 @@ void dissociate_lease (lease)
#endif
lt -> ends = cur_time; /* XXX */
lt -> hardware_addr.hlen = 0;
- if (lt -> uid != lt -> uid_buf)
+ if (lt -> uid && lt -> uid != lt -> uid_buf)
dfree (lt -> uid, MDL);
lt -> uid = (unsigned char *)0;
lt -> uid_len = 0;