On 06/11/2014 03:38 PM, John Ferlan wrote: > Clean up some Coverity warnings from commit id '4dc5d8f1' > > Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> > --- > src/vbox/vbox_snapshot_conf.c | 27 ++++++++++++++++++--------- > 1 file changed, 18 insertions(+), 9 deletions(-) > > diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c > index 9c78410..676a0e1 100644 > --- a/src/vbox/vbox_snapshot_conf.c > +++ b/src/vbox/vbox_snapshot_conf.c > @@ -1257,6 +1257,11 @@ virVBoxSnapshotConfIsCurrentSnapshot(virVBoxSnapshotConfMachinePtr machine, > goto cleanup; > } > snapshot = virVBoxSnapshotConfSnapshotByName(machine->snapshot, snapshotName); > + if (snapshot == NULL) { > + virReportError(VIR_ERR_INTERNAL_ERROR, You can use VIR_ERR_NO_DOMAIN_SNAPSHOT here > + _("Unable to find the snapshot %s"), snapshotName); > + goto cleanup; > + } > return STREQ(snapshot->uuid, machine->currentSnapshot); > ACK Jan
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list