recently added more reads into that function, if a later read fails, i must either free what's already allocated, or return the pointer so that the free callback will release it.