diff options
author | Shawn Routhier <sar@isc.org> | 2012-04-11 15:44:14 +0000 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2012-04-11 15:44:14 +0000 |
commit | 65231cf83eec37136cb10be3e7016c4de7741353 (patch) | |
tree | 265509bb7437121301dfa8f254391a4685609118 /dst | |
parent | 057abb574878ff5b885db2e8f1b12513ff959d51 (diff) | |
download | isc-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 'dst')
-rw-r--r-- | dst/dst_api.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dst/dst_api.c b/dst/dst_api.c index 6ec8f022..b0540085 100644 --- a/dst/dst_api.c +++ b/dst/dst_api.c @@ -1,10 +1,11 @@ #ifndef LINT -static const char rcsid[] = "$Header: /tmp/cvstest/DHCP/dst/dst_api.c,v 1.6.220.1 2009/01/22 02:07:42 sar Exp $"; +static const char rcsid[] = "$Header: /tmp/cvstest/DHCP/dst/dst_api.c,v 1.6.220.1.10.1 2012/04/11 15:44:14 sar Exp $"; #endif /* * Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc. * Portions Copyright (c) 2007,2009 by Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (c) 2012 by Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -341,7 +342,7 @@ dst_read_key(const char *in_keyname, const unsigned in_id, in_alg)); return (NULL); } - if ((type && (DST_PUBLIC | DST_PRIVATE)) == 0) + if ((type & (DST_PUBLIC | DST_PRIVATE)) == 0) return (NULL); if (in_keyname == NULL) { EREPORT(("dst_read_private_key(): Null key name passed in\n")); |