Free memory stored when error occurs - otherwise buffer leaks

This commit is contained in:
Paulo Matos 2019-02-13 09:09:54 +01:00 committed by Matthew Flatt
parent 14499aa822
commit 136ea767e2

View File

@ -889,6 +889,7 @@ char *rktio_readlink(rktio_t *rktio, const char *fullfilename)
set_racket_error(RKTIO_ERROR_NOT_A_LINK);
else
get_posix_error();
free(buffer);
return NULL;
}
} else if (len == buf_len) {