tolerate NULL cleanup functions in commands in batches

This commit is contained in:
Christian Grothoff 2023-02-13 12:21:47 +01:00
parent 6db4bdbe6e
commit 3760d43097
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -97,8 +97,9 @@ batch_cleanup (void *cls,
for (unsigned int i = 0; for (unsigned int i = 0;
NULL != bs->batch[i].label; NULL != bs->batch[i].label;
i++) i++)
bs->batch[i].cleanup (bs->batch[i].cls, if (NULL != bs->batch[i].cleanup)
&bs->batch[i]); bs->batch[i].cleanup (bs->batch[i].cls,
&bs->batch[i]);
GNUNET_free (bs->batch); GNUNET_free (bs->batch);
GNUNET_free (bs); GNUNET_free (bs);
} }