Re: [PATCH 2/3] vbox_snapshot_conf: Resolve Coverity warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]