[libvirt] [PATCH 1/7] conf: Add error checking to virDomainSnapshotDiskDefFormat

Peter Krempa pkrempa at redhat.com
Wed Apr 18 07:06:36 UTC 2018


On Tue, Apr 17, 2018 at 12:22:12 -0400, John Ferlan wrote:
> Commit id '43f2ccdc' called virDomainDiskSourceDefFormatInternal
> rather than formatting the the disk source inline. However, it
> did not handle the case where the helper failed. Over time the
> helper has been renamed to virDomainDiskSourceFormat. Similar to
> other consumers, if virDomainDiskSourceFormat fails, then the
> formatting could be off, so it's better to fail than to continue
> on with some possibly bad data. Alter the function and the caller
> to check status and jump to error in that case.
> 
> Found by Coverity
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/conf/snapshot_conf.c | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180418/4c05f24c/attachment-0001.sig>


More information about the libvir-list mailing list