diff --git a/nbio/nbio_stdio.c b/nbio/nbio_stdio.c index 101ff40bbb..9695fd9c6f 100644 --- a/nbio/nbio_stdio.c +++ b/nbio/nbio_stdio.c @@ -138,6 +138,8 @@ void* nbio_get_ptr(struct nbio_t* handle, size_t* len) void nbio_free(struct nbio_t* handle) { + if (!handle) + return; fclose(handle->f); free(handle->data); }