diff --git a/lib/util/io_channel.c b/lib/util/io_channel.c index e2b3c12b5..46b208367 100644 --- a/lib/util/io_channel.c +++ b/lib/util/io_channel.c @@ -415,7 +415,9 @@ _call_completion(void *ctx) { struct call_channel *ch_ctx = ctx; - ch_ctx->cpl(ch_ctx->io_device, ch_ctx->ctx); + if (ch_ctx->cpl != NULL) { + ch_ctx->cpl(ch_ctx->io_device, ch_ctx->ctx); + } free(ch_ctx); }