From: Martin Schwenke Date: Mon, 28 Feb 2022 05:11:18 +0000 (+1100) Subject: ctdb-tests: Terminate event loop if lock is no longer held X-Git-Tag: samba-4.17.0rc1~246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25d32ae97a6d7d425eea6f2e9585a1596776493c;p=thirdparty%2Fsamba.git ctdb-tests: Terminate event loop if lock is no longer held Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/src/cluster_mutex_test.c b/ctdb/tests/src/cluster_mutex_test.c index 1252b688d94..f8f2f7aa7ef 100644 --- a/ctdb/tests/src/cluster_mutex_test.c +++ b/ctdb/tests/src/cluster_mutex_test.c @@ -242,7 +242,7 @@ static void do_lock_wait_time(struct do_lock_context *dl, &done); assert(tt != NULL); - while (! done) { + while (!done && dl->mh != NULL) { tevent_loop_once(dl->ctdb->ev); } }