On Wed, Feb 11, 2015 at 06:41:19PM +0800, Chen Hanxiao wrote:
> +  if (nlines < 1)
> +    return NULL;

This error handling is wrong.  It would cause the protocol between the
appliance and library to become desynchronized.  You have to call one
of the error functions -- eg. `reply_with_error' before returning
NULL.

The rest of this patch looks fine, if this change was made.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to