Re: [PATCH 4/9] virDomainObjIsActive: Allow vm->def to be NULL

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

 




On 30.05.2019 12:33, Michal Privoznik wrote:
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index fa0756b634..e1b5df7e46 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -2766,7 +2766,7 @@ int virDomainDefValidate(virDomainDefPtr def,
>  static inline bool
>  virDomainObjIsActive(virDomainObjPtr dom)
>  {
> -    return dom->def->id != -1;
> +    return dom->def && dom->def->id != -1;
>  }
>  
>  int virDomainObjCheckActive(virDomainObjPtr dom);
> 

Reviewed-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>

--
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]

  Powered by Linux