3190. [bug] Underflow in error handling in isc_mutexblock_init.

[RT #26397]
This commit is contained in:
Mark Andrews
2011-11-01 21:59:56 +00:00
parent 84087ba49e
commit 3975f627fe
2 changed files with 6 additions and 4 deletions

View File

@@ -1,3 +1,6 @@
3190. [bug] Underflow in error handling in isc_mutexblock_init.
[RT #26397]
3189. [test] Added a summary report after system tests. [RT #25517]
3188. [bug] zone.c:zone_refreshkeys() could fail to detach

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mutexblock.c,v 1.20 2007/06/19 23:47:17 tbox Exp $ */
/* $Id: mutexblock.c,v 1.21 2011/11/01 21:59:56 marka Exp $ */
/*! \file */
@@ -32,10 +32,9 @@ isc_mutexblock_init(isc_mutex_t *block, unsigned int count) {
for (i = 0; i < count; i++) {
result = isc_mutex_init(&block[i]);
if (result != ISC_R_SUCCESS) {
i--;
while (i > 0) {
DESTROYLOCK(&block[i]);
while (i > 0U) {
i--;
DESTROYLOCK(&block[i]);
}
return (result);
}