Skip to content

Commit 54f1c6f

Browse files
committed
storage: on exit validate Chunk I/O context
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 8d40643 commit 54f1c6f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/flb_storage.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,12 @@ void flb_storage_destroy(struct flb_config *ctx)
284284

285285
/* Destroy Chunk I/O context */
286286
cio = (struct cio_ctx *) ctx->cio;
287-
cio_destroy(cio);
288287

288+
if (!cio) {
289+
return;
290+
}
291+
292+
cio_destroy(cio);
289293
if (ctx->storage_bl_mem_limit) {
290294
flb_free(ctx->storage_bl_mem_limit);
291295
}

0 commit comments

Comments
 (0)