summaryrefslogtreecommitdiff
path: root/omapip/protocol.c
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2012-04-11 15:44:14 +0000
committerShawn Routhier <sar@isc.org>2012-04-11 15:44:14 +0000
commit65231cf83eec37136cb10be3e7016c4de7741353 (patch)
tree265509bb7437121301dfa8f254391a4685609118 /omapip/protocol.c
parent057abb574878ff5b885db2e8f1b12513ff959d51 (diff)
downloadisc-dhcp-65231cf83eec37136cb10be3e7016c4de7741353.tar.gz
Fix up some issues found by static analysis
A potential memory leak and NULL dereference in omapi. The use of a boolean test instead of a bitwise test in dst. [ISC-Bugs #28941]
Diffstat (limited to 'omapip/protocol.c')
-rw-r--r--omapip/protocol.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/omapip/protocol.c b/omapip/protocol.c
index 5b4063f3..62a3c9ff 100644
--- a/omapip/protocol.c
+++ b/omapip/protocol.c
@@ -3,7 +3,8 @@
Functions supporting the object management protocol... */
/*
- * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009,2012 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
@@ -926,12 +927,10 @@ isc_result_t omapi_protocol_destroy (omapi_object_t *h,
dfree (p -> default_auth, file, line);
while (p -> remote_auth_list) {
- omapi_remote_auth_t *r = p -> remote_auth_list -> next;
- p -> remote_auth_list = r;
- if (r) {
- omapi_object_dereference (&r -> a, file, line);
- dfree (r, file, line);
- }
+ omapi_remote_auth_t *r = p -> remote_auth_list;
+ p -> remote_auth_list = p -> remote_auth_list -> next;
+ omapi_object_dereference (&r -> a, file, line);
+ dfree (r, file, line);
}
return ISC_R_SUCCESS;
}