Re: [Xen-devel] [PATCH for-4.5 1/3] python/xc: Fix multiple issues in pyflask_context_to_sid()

2014-12-09 Thread Ian Campbell
On Fri, 2014-11-28 at 11:37 +, Ian Campbell wrote: On Thu, 2014-11-27 at 12:34 +, Andrew Cooper wrote: The error handling from a failed memory allocation should return PyErr_SetFromErrno(xc_error_obj); rather than simply calling it and continuing to the memcpy() below, with the

Re: [Xen-devel] [PATCH for-4.5 1/3] python/xc: Fix multiple issues in pyflask_context_to_sid()

2014-12-09 Thread Andrew Cooper
On 09/12/14 14:27, Ian Campbell wrote: On Fri, 2014-11-28 at 11:37 +, Ian Campbell wrote: On Thu, 2014-11-27 at 12:34 +, Andrew Cooper wrote: The error handling from a failed memory allocation should return PyErr_SetFromErrno(xc_error_obj); rather than simply calling it and

Re: [Xen-devel] [PATCH for-4.5 1/3] python/xc: Fix multiple issues in pyflask_context_to_sid()

2014-12-09 Thread Konrad Rzeszutek Wilk
On Tue, Dec 09, 2014 at 02:30:24PM +, Andrew Cooper wrote: On 09/12/14 14:27, Ian Campbell wrote: On Fri, 2014-11-28 at 11:37 +, Ian Campbell wrote: On Thu, 2014-11-27 at 12:34 +, Andrew Cooper wrote: The error handling from a failed memory allocation should return

Re: [Xen-devel] [PATCH for-4.5 1/3] python/xc: Fix multiple issues in pyflask_context_to_sid()

2014-11-28 Thread Ian Campbell
On Thu, 2014-11-27 at 12:34 +, Andrew Cooper wrote: The error handling from a failed memory allocation should return PyErr_SetFromErrno(xc_error_obj); rather than simply calling it and continuing to the memcpy() below, with the dest pointer being NULL. Furthermore, the context string is

Re: [Xen-devel] [PATCH for-4.5 1/3] python/xc: Fix multiple issues in pyflask_context_to_sid()

2014-11-28 Thread Ian Campbell
On Fri, 2014-11-28 at 11:47 +, Andrew Cooper wrote: On 28/11/14 11:37, Ian Campbell wrote: On Thu, 2014-11-27 at 12:34 +, Andrew Cooper wrote: The error handling from a failed memory allocation should return PyErr_SetFromErrno(xc_error_obj); rather than simply calling it and

[Xen-devel] [PATCH for-4.5 1/3] python/xc: Fix multiple issues in pyflask_context_to_sid()

2014-11-27 Thread Andrew Cooper
The error handling from a failed memory allocation should return PyErr_SetFromErrno(xc_error_obj); rather than simply calling it and continuing to the memcpy() below, with the dest pointer being NULL. Furthermore, the context string is simply an input parameter to the hypercall, and is not