summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-02-13 12:21:47 +0100
committerChristian Grothoff <christian@grothoff.org>2023-02-13 12:21:56 +0100
commit3760d43097b8b72dbb7c45ab061aad669c36aefa (patch)
tree00da42643349e793c2ca7084d588794929454799
parent6db4bdbe6e39b84b995b11ab132a7c6706686677 (diff)
downloadexchange-3760d43097b8b72dbb7c45ab061aad669c36aefa.tar.gz
exchange-3760d43097b8b72dbb7c45ab061aad669c36aefa.tar.bz2
exchange-3760d43097b8b72dbb7c45ab061aad669c36aefa.zip
tolerate NULL cleanup functions in commands in batches
-rw-r--r--src/testing/testing_api_cmd_batch.c5
1 files 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);
}