]> xenbits.xensource.com Git - libvirt.git/commit
conf: Add error checking to virDomainSnapshotDiskDefFormat
authorJohn Ferlan <jferlan@redhat.com>
Wed, 8 Nov 2017 12:13:20 +0000 (07:13 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 19 Apr 2018 18:23:39 +0000 (14:23 -0400)
commitc028c7193055f072307dd8b2293b240135e1ae69
treee783c3ca56276891f4256e4ee5e5d9542999ca81
parentfb1fae94a1061a8d0358c4ba51ac5b23d1d0cc52
conf: Add error checking to virDomainSnapshotDiskDefFormat

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@redhat.com>
src/conf/snapshot_conf.c