Fix failed merge

This commit is contained in:
Alcaro 2015-02-17 00:30:23 +01:00
parent 7440c4a5a7
commit 9a0c0d8b74

View File

@ -134,19 +134,19 @@ void* nbio_get_ptr(struct nbio_t* handle, size_t* len)
void nbio_cancel(struct nbio_t* handle)
{
handle->op = -1;
handle->progress = handle->len;
handle->op = -1;
handle->progress = handle->len;
}
void nbio_free(struct nbio_t* handle)
{
if (!handle)
return;
if (handle->op >= 0)
{
puts("ERROR - attempted free() while busy");
abort();
}
if (!handle)
return;
fclose(handle->f);
free(handle->data);
}