On 10/21/21 17:34, Jonathan Wakely wrote:
On Thu, 21 Oct 2021 at 20:38, Jason Merrill wrote:On 10/21/21 09:28, Jonathan Wakely wrote: > #else > buffer = xmalloc (stat.st_size); > if (!buffer) > return -errno; > + struct Deleter { void operator()(void* p) const { free(p); } }; > + std::unique_ptr<void, Deleter> guard; Don't you need to initialize guard from buffer? Oops, yes! Updated patch attached.
OK, thanks. Jason