From 262596e61b09dbaf32a8f4de62f56163826f869e Mon Sep 17 00:00:00 2001 From: Sung-hun Kim Date: Tue, 9 Aug 2022 11:01:48 +0900 Subject: [PATCH] util: thread: Use wait_for_completion without result Change-Id: I3969491c2ce9d8ecccfdb064bc65274cb05cb53f Signed-off-by: Sung-hun Kim --- src/util/thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/thread.c b/src/util/thread.c index 8bcef56..0bf45ec 100644 --- a/src/util/thread.c +++ b/src/util/thread.c @@ -196,7 +196,8 @@ int wait_for_completion(struct thread *thread, void **result) if (ret == THREAD_RETURN_ERROR) return ret; - *result = ctx->result; + if (result) + *result = ctx->result; cnd_destroy(&ctx->wait); mtx_destroy(&ctx->lock); -- 2.34.1