diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-02-13 12:21:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-13 12:21:56 +0100 |
commit | 3760d43097b8b72dbb7c45ab061aad669c36aefa (patch) | |
tree | 00da42643349e793c2ca7084d588794929454799 /src/testing | |
parent | 6db4bdbe6e39b84b995b11ab132a7c6706686677 (diff) | |
download | exchange-3760d43097b8b72dbb7c45ab061aad669c36aefa.tar.xz |
tolerate NULL cleanup functions in commands in batches
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/testing_api_cmd_batch.c | 5 |
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); } |