
24 Oct
2019
24 Oct
'19
4:23 p.m.
On Thu, Oct 24, 2019 at 03:56:21PM +0200, Peter Krempa wrote:
Replace combinations of xalloc_oversized and VIR_ALLOC_N_QUIET by using g_malloc0_n which does the checking internally.
This conversion is done with a semantic difference and slightly higher memory requirements as I've opted to allocate one chunk more than necessary rather than trying to accomodate the NUL byte separately.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/util/virbuffer.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano