Re: [PATCH 2/3] virQEMUCapsNewBinary: Avoid NULL dereference

2020-03-30 Thread Daniel P . Berrangé
On Mon, Mar 30, 2020 at 11:24:59AM +0200, Michal Privoznik wrote: > Even with GLib it is still possible for virQEMUCapsNew() to > return NULL because it calls virQEMUCapsInitialize() which is a > wrapper over pthread_once() which may fail. At least, we still > check for its retval. If it so happens

[PATCH 2/3] virQEMUCapsNewBinary: Avoid NULL dereference

2020-03-30 Thread Michal Privoznik
Even with GLib it is still possible for virQEMUCapsNew() to return NULL because it calls virQEMUCapsInitialize() which is a wrapper over pthread_once() which may fail. At least, we still check for its retval. If it so happens that the virQEMUCapsNew() fails and returns NULL, we should not dereferen