From 3760d43097b8b72dbb7c45ab061aad669c36aefa Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 13 Feb 2023 12:21:47 +0100 Subject: [PATCH] tolerate NULL cleanup functions in commands in batches --- src/testing/testing_api_cmd_batch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/testing/testing_api_cmd_batch.c b/src/testing/testing_api_cmd_batch.c index e8f76ca37..a5263b03e 100644 --- a/src/testing/testing_api_cmd_batch.c +++ b/src/testing/testing_api_cmd_batch.c @@ -97,8 +97,9 @@ batch_cleanup (void *cls, for (unsigned int i = 0; NULL != bs->batch[i].label; i++) - bs->batch[i].cleanup (bs->batch[i].cls, - &bs->batch[i]); + if (NULL != bs->batch[i].cleanup) + bs->batch[i].cleanup (bs->batch[i].cls, + &bs->batch[i]); GNUNET_free (bs->batch); GNUNET_free (bs); }