[libvirt] [PATCH] remote: avoid null dereference on error
Eric Blake
eblake at redhat.com
Tue May 3 17:38:56 UTC 2011
On 05/03/2011 11:28 AM, Eric Blake wrote:
> Clang found three instances of uninitialized use of nparams in
> the cleanup path. Unfortunately, one is a false positive: clang
> couldn't see that ret->params.params_val is guaranteed to be
> NULL unless allocated within a function, and that nparams is
> guaranteed to be assigned prior to the allocation; hoisting the
> assignment to nparams to be earlier in the function shuts up
> that false positive. But two of the reports also happened to
> highlight a real bug - the error path can dereference NULL.
I meant to add:
Regression introduced in commit 158ba873.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110503/12731777/attachment-0001.sig>
More information about the libvir-list
mailing list