2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 22:35:25 +00:00
[rt23833]
Clean up a number of items identified by the Coverity
static analysis tool.  Runs courtesy of Red Hat.
This commit is contained in:
Shawn Routhier
2012-10-16 15:05:24 -07:00
parent 881442e20f
commit 0f750c4fb1
29 changed files with 309 additions and 182 deletions

View File

@@ -1093,7 +1093,12 @@ ddns_update_lease_ptr(struct lease *lease,
{
char ddns_address[MAX_ADDRESS_STRING_LEN];
sprintf(ddns_address, "unknown");
if (ddns_cb) {
if (ddns_cb == NULL) {
log_info("%s(%d): No control block for lease update",
file, line);
return (ISC_R_FAILURE);
}
else {
strncpy(ddns_address, piaddr(ddns_cb->address),
MAX_ADDRESS_STRING_LEN);
}