]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence Coverity missing lock warning.
authorMark Andrews <marka@isc.org>
Mon, 7 Sep 2020 04:51:06 +0000 (14:51 +1000)
committerMark Andrews <marka@isc.org>
Wed, 9 Sep 2020 21:02:51 +0000 (21:02 +0000)
Lock access to 'done' during initialisation in manytasks().

lib/isc/tests/task_test.c

index fb1179f3dd25245aa0966068657be3ab4d9c927f..7af65dc44a80d8278958af52923df7a2b856be63 100644 (file)
@@ -796,7 +796,9 @@ manytasks(void **state) {
        result = isc_taskmgr_create(mctx, 4, 0, &taskmgr);
        assert_int_equal(result, ISC_R_SUCCESS);
 
+       LOCK(&lock);
        done = false;
+       UNLOCK(&lock);
 
        event = isc_event_allocate(mctx, (void *)1, 1, maxtask_cb,
                                   (void *)ntasks, sizeof(*event));