[libvirt] [PATCH 2/6] virDomainFormatSchedDef: Handle case when func returns NULL

Peter Krempa pkrempa at redhat.com
Tue May 31 10:52:01 UTC 2016

On Tue, May 31, 2016 at 12:33:26 +0200, Michal Privoznik wrote:
> As unlikely as it might seem, func passed to this function can
> return NULL. And in some cases it indeed does so:
> virDomainDefGetVcpuSched and virDomainDefGetIOThreadSched.
> However, the function I'm fixing blindly dereference value func
> returned thus leading to SIGSEGV.

Same as in the coverity case complaining about this it won't happen here
since we are iterating a known list of items that was collected
beforehand and thus no crashing will happen.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160531/5249be09/attachment-0001.sig>

More information about the libvir-list mailing list