+2216. [cleanup] Fix a number of errors reported by Coverity.
+ [RT #17094]
+
2215. [bug] Bad REQUIRE check isc_hmacsha1_verify(). [RT #17094]
2214. [bug] Deregister OpenSSL lock callback when cleaning
#ifndef LINT
-static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/dst_api.c,v 1.15 2006/03/09 23:57:56 marka Exp $";
+static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/dst_api.c,v 1.16 2007/08/27 03:32:26 marka Exp $";
#endif
/*
pubkey->dk_alg) == 0)
dg_key = dst_free_key(dg_key);
- pubkey = dst_free_key(pubkey);
+ (void)dst_free_key(pubkey);
return (dg_key);
}
goto unknown;
if (!once) {
if (pthread_key_create(&key, free) != 0) {
- pthread_mutex_unlock(&lock);
+ (void)pthread_mutex_unlock(&lock);
goto unknown;
}
once = 1;
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: irs_data.c,v 1.11 2007/02/25 23:46:58 marka Exp $";
+static const char rcsid[] = "$Id: irs_data.c,v 1.12 2007/08/27 03:32:26 marka Exp $";
#endif
#include "port_before.h"
return (NULL);
if (!once) {
if (pthread_key_create(&key, net_data_destroy) != 0) {
- pthread_mutex_unlock(&keylock);
+ (void)pthread_mutex_unlock(&keylock);
return (NULL);
}
once = 1;
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_parse.c,v 1.8 2005/10/11 00:10:15 marka Exp $";
+static const char rcsid[] = "$Id: ns_parse.c,v 1.9 2007/08/27 03:32:26 marka Exp $";
#endif
/* Import. */
/* Macros. */
-#ifndef SOLARIS2
+#if !defined(SOLARIS2) || defined(__COVERITY__)
#define RETERR(err) do { errno = (err); return (-1); } while (0)
#else
#define RETERR(err) \
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: master.c,v 1.165 2007/06/18 23:47:40 tbox Exp $ */
+/* $Id: master.c,v 1.166 2007/08/27 03:32:26 marka Exp $ */
/*! \file */
INSIST(result != DNS_R_CONTINUE);
cleanup:
- if (lctx != NULL)
- dns_loadctx_detach(&lctx);
+ dns_loadctx_detach(&lctx);
return (result);
}
}
cleanup:
- if (lctx != NULL)
- dns_loadctx_detach(&lctx);
+ dns_loadctx_detach(&lctx);
return (result);
}
INSIST(result != DNS_R_CONTINUE);
cleanup:
- if (lctx != NULL)
- dns_loadctx_detach(&lctx);
+ dns_loadctx_detach(&lctx);
return (result);
}
}
cleanup:
- if (lctx != NULL)
- dns_loadctx_detach(&lctx);
+ dns_loadctx_detach(&lctx);
return (result);
}
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sdb.c,v 1.58 2007/06/18 23:47:41 tbox Exp $ */
+/* $Id: sdb.c,v 1.59 2007/08/27 03:32:27 marka Exp $ */
/*! \file */
/* This is a reasonable value */
#define SDB_DEFAULT_TTL (60 * 60 * 24)
+#ifdef __COVERITY__
+#define MAYBE_LOCK(sdb) LOCK(&sdb->implementation->driverlock)
+#define MAYBE_UNLOCK(sdb) UNLOCK(&sdb->implementation->driverlock)
+#else
#define MAYBE_LOCK(sdb) \
do { \
unsigned int flags = sdb->implementation->flags; \
if ((flags & DNS_SDBFLAG_THREADSAFE) == 0) \
UNLOCK(&sdb->implementation->driverlock); \
} while (0)
+#endif
static int dummy;
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sdlz.c,v 1.13 2007/06/18 23:47:41 tbox Exp $ */
+/* $Id: sdlz.c,v 1.14 2007/08/27 03:32:27 marka Exp $ */
/*! \file */
static int dummy;
+#ifdef __COVERITY__
+#define MAYBE_LOCK(imp) LOCK(&imp->driverlock)
+#define MAYBE_UNLOCK(imp) UNLOCK(&imp->driverlock)
+#else
#define MAYBE_LOCK(imp) \
do { \
unsigned int flags = imp->flags; \
if ((flags & DNS_SDLZFLAG_THREADSAFE) == 0) \
UNLOCK(&imp->driverlock); \
} while (0)
+#endif
/*
* Forward references. Try to keep these to a minimum.
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.465 2007/06/18 23:47:42 tbox Exp $ */
+/* $Id: zone.c,v 1.466 2007/08/27 03:32:27 marka Exp $ */
/*! \file */
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(messagep != NULL && *messagep == NULL);
- message = NULL;
result = dns_message_create(zone->mctx, DNS_MESSAGE_INTENTRENDER,
&message);
if (result != ISC_R_SUCCESS)
dns_message_puttempname(message, &tempname);
if (temprdataset != NULL)
dns_message_puttemprdataset(message, &temprdataset);
- if (message != NULL)
- dns_message_destroy(&message);
+ dns_message_destroy(&message);
return (result);
}
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: httpd.c,v 1.10 2007/06/18 23:47:44 tbox Exp $ */
+/* $Id: httpd.c,v 1.11 2007/08/27 03:32:27 marka Exp $ */
/*! \file */
if (httpd == NULL)
return (ISC_R_NOMEMORY);
- isc_mutex_init(&httpd->lock);
+ result = isc_mutex_init(&httpd->lock);
+ if (result != ISC_R_SUCCESS) {
+ isc_mem_put(mctx, httpd, sizeof(isc_httpdmgr_t));
+ return (result);
+ }
httpd->mctx = NULL;
isc_mem_attach(mctx, &httpd->mctx);
httpd->sock = NULL;
result = isc_socket_accept(sock, task, isc_httpd_accept, httpd);
if (result != ISC_R_SUCCESS) {
+ isc_task_detach(&httpd->task);
+ isc_socket_detach(&httpd->sock);
+ isc_mem_detach(&httpd->mctx);
+ isc_mutex_destroy(&httpd->lock);
isc_mem_put(mctx, httpd, sizeof(isc_httpdmgr_t));
return (result);
}