Re: [libvirt] [PATCH v2 2/4] rpc: gendispatch: Add a check for zero size client-side buffers

2019-11-21 Thread Daniel P . Berrangé
On Thu, Nov 21, 2019 at 09:58:30AM +0100, Erik Skultety wrote: > After libvirt switched to GLib, we also started to use glib allocation > primitives as of commit e85e34f3. Unlike malloc which is ambiguous with > regards to size == 0 (which in our case returned a unique pointer safe > to be passed t

[libvirt] [PATCH v2 2/4] rpc: gendispatch: Add a check for zero size client-side buffers

2019-11-21 Thread Erik Skultety
After libvirt switched to GLib, we also started to use glib allocation primitives as of commit e85e34f3. Unlike malloc which is ambiguous with regards to size == 0 (which in our case returned a unique pointer safe to be passed to free), g_malloc0 strictly returns NULL on size == 0. This change bro