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

Re: [Xen-devel] [PATCH 04/18] xen: create xenstore areas for XenDevice-s



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.
<20181205162603.25788-1-anthony.perard@xxxxxxxxxx>

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.