Re: [PATCH 3/9] conf: events: don't crash on NULL uuid

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

 



On 07/20/2016 09:50 AM, Jovanka Gulicoska wrote:
> nodedev events don't have a uuid value and will pass in NULL
> ---
>  src/conf/object_event.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/conf/object_event.c b/src/conf/object_event.c
> index cb984ff..bbef7f6 100644
> --- a/src/conf/object_event.c
> +++ b/src/conf/object_event.c
> @@ -659,7 +659,8 @@ virObjectEventNew(virClassPtr klass,
>          return NULL;
>      }
>      event->meta.id = id;
> -    memcpy(event->meta.uuid, uuid, VIR_UUID_BUFLEN);
> +    if (uuid)
> +        memcpy(event->meta.uuid, uuid, VIR_UUID_BUFLEN);
>  
>      VIR_DEBUG("obj=%p", event);
>      return event;
> 

I'll just push this now, since it's self contained and trivial. I reworked the
commit message a bit to make it clear that this is for future nodedev work

Thanks,
Cole

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