[Libguestfs] [PATCH nbdkit v2] common/bitmap: Don't fail on realloc (ptr, 0)
Richard W.M. Jones
rjones at redhat.com
Sun Sep 15 11:55:27 UTC 2019
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-September/msg00100.html
In v2 I've changed the patch so it avoids calling realloc at all in
this case.
The patch is a bit longer this way. But I don't see any other
alternative if we are to avoid having a "realloc wrapper" of some kind
that we use everywhere, which I guess we should avoid because it makes
plugins just that bit harder to write and we want them to be as easy
to write and accessible as possible.
Also:
- Clean up the commit message.
- Add a simple regression test.
Rich.
More information about the Libguestfs
mailing list