[netcf-devel] [PATCH] Be sure to bail if get_augeas() fails

Eric Blake eblake at redhat.com
Thu Sep 13 20:00:36 UTC 2012


On 09/13/2012 01:39 PM, Laine Stump wrote:
> There were a few places where get_augeas() was called at the beginning
> of a function, but the function was allowed to continue as normal even
> if get_augeas() failed. This was disastrous if any augeas library
> function was subsequently called prior to checking for error status -
> get_augeas sets ncf->driver->augeas to NULL if there's an error, but
> aug_get/aug_put/aug_rm (and possibly others) dereference the aug
> pointer they are sent without checking for NULL.
> 
> This patch assures that any caller of get_augeas() returns immediately
> if get_augeas() fails.
> ---

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <https://lists.fedorahosted.org/pipermail/netcf-devel/attachments/20120913/2ee7df1a/attachment.sig>


More information about the netcf-devel mailing list