[CRIU] Re: [PATCH cr 2/2] sk-queue: don't overwrite a return code
Pavel Emelyanov
xemul at parallels.com
Fri Sep 28 06:02:57 EDT 2012
On 09/27/2012 10:37 PM, Andrey Vagin wrote:
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> sk-queue.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/sk-queue.c b/sk-queue.c
> index 9f872bb..347f987 100644
> --- a/sk-queue.c
> +++ b/sk-queue.c
> @@ -160,9 +160,10 @@ err_set_sock:
> /*
> * Restore original peek offset.
> */
> - ret = setsockopt(sock_fd, SOL_SOCKET, SO_PEEK_OFF, &orig_peek_off, sizeof(int));
> - if (ret < 0)
> + if (setsockopt(sock_fd, SOL_SOCKET, SO_PEEK_OFF, &orig_peek_off, sizeof(int))) {
> pr_perror("setsockopt failed on restore\n");
> + ret = -1;
> + }
> err_brk:
> xfree(data);
> return ret;
Both applied, thanks
More information about the CRIU
mailing list