
< 	if (ret)
< 		return ret;
---
> 	if (ret) {
> 		vfree(data);
> 		size = 0;
> 		return ret;
> 	}
