summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/kernel/net-txrx.c1
-rw-r--r--src/kernel/net.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/net-txrx.c b/src/kernel/net-txrx.c
index 27b07ea..3a9b057 100644
--- a/src/kernel/net-txrx.c
+++ b/src/kernel/net-txrx.c
@@ -227,7 +227,6 @@ int dnbd3_send_request_cmd(struct dnbd3_sock *sock, uint16_t dnbd3_cmd)
result = -EIO;
goto error;
}
- sock->pending = req;
result = dnbd3_send_request(sock, req, NULL);
error:
diff --git a/src/kernel/net.c b/src/kernel/net.c
index 5f9846a..838aafb 100644
--- a/src/kernel/net.c
+++ b/src/kernel/net.c
@@ -37,8 +37,9 @@
#define dnbd3_sock_release(sock) \
do { \
- sock_release((sock)->sock); \
+ struct socket *s = (sock)->sock; \
sock->sock = NULL; \
+ sock_release(s); \
}while (0)
#define dnbd3_is_sock_alive(s) ((s).sock && (s).server)