Re: [PATCH 01/25] conf, vmx: check for OOM after calling xmlBufferCreate()

2020-06-25 Thread Ján Tomko
On a Wednesday in 2020, Laine Stump wrote: Although libvirt itself uses g_malloc0() and friends, which exit when there isn't enouogh memory, libxml2 uses standard malloc(), which just returns NULL on OOM - this means we must check for NULL on return from any libxml2 functions that allocate

[PATCH 01/25] conf, vmx: check for OOM after calling xmlBufferCreate()

2020-06-24 Thread Laine Stump
Although libvirt itself uses g_malloc0() and friends, which exit when there isn't enouogh memory, libxml2 uses standard malloc(), which just returns NULL on OOM - this means we must check for NULL on return from any libxml2 functions that allocate memory. xmlBufferCreate(), for example, might