Update nbio_stdio.c

This commit is contained in:
Alcaro 2015-02-15 23:30:56 +01:00
parent cfa388ed77
commit 4171b49b44

View File

@ -45,7 +45,7 @@ struct nbio_t* nbio_open(const char * filename, enum nbio_mode_t mode)
handle->data = malloc(handle->len);
if (!handle->data)
if (handle->len && !handle->data)
{
free(handle);
fclose(f);