qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 04/18] xen: create xenstore areas for XenDevice-


From: Anthony PERARD
Subject: Re: [Qemu-block] [PATCH 04/18] xen: create xenstore areas for XenDevice-s
Date: Wed, 5 Dec 2018 16:28:55 +0000
User-agent: Mutt/1.11.1 (2018-12-01)

On Wed, Dec 05, 2018 at 12:05:23PM +0000, Paul Durrant wrote:
> > > +    value = xs_read(xsh, XBT_NULL, path, NULL);
> > 
> > The xenstore.h isn't clear about failure of this function, it is
> > supposed to return a malloced value. Do we actually need to check if value
> > is NULL?
> 
> The comment above xs_read() in xs.c is:
> 
> /* Get the value of a single file, nul terminated.                          
>  * Returns a malloced value: call free() on it after use.                   
>  * len indicates length in bytes, not including the nul.                    
>  */
> 
> and I think we should check it for NULL before passing it to vsscanf().

I've sent a patch against xenstore.h to document that xs_read, and some
other functions, can return NULL.
<address@hidden>

-- 
Anthony PERARD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]