(nbio) nbio_free - add early return in case handle is NULL

This commit is contained in:
twinaphex 2015-02-16 00:34:55 +01:00
parent 215c434e81
commit 395aa9b15f

View File

@ -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);
}