[CRIU] [PATCH cr 2/2] sk-queue: don't overwrite a return code
Andrey Vagin
avagin at openvz.org
Thu Sep 27 14:37:13 EDT 2012
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;
--
1.7.1
More information about the CRIU
mailing list