commit 3760d43097b8b72dbb7c45ab061aad669c36aefa parent 6db4bdbe6e39b84b995b11ab132a7c6706686677 Author: Christian Grothoff <christian@grothoff.org> Date: Mon, 13 Feb 2023 12:21:47 +0100 tolerate NULL cleanup functions in commands in batches Diffstat:
| M | 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 @@ -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); }