summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2020-07-17 13:26:19 +0200
committerSimon Rettberg2020-07-17 13:26:19 +0200
commit5300ac0fe8dabc2f4327462a18286d7951b38a33 (patch)
tree9e94f1b2e9f0153eea7772649901b3acdcec881e
parent[KERNEL] Properly bail out on kmalloc failures (diff)
downloaddnbd3-ng-5300ac0fe8dabc2f4327462a18286d7951b38a33.tar.gz
dnbd3-ng-5300ac0fe8dabc2f4327462a18286d7951b38a33.tar.xz
dnbd3-ng-5300ac0fe8dabc2f4327462a18286d7951b38a33.zip
[KERNEL] After nullptr check, MAYBE RETURN!?
-rw-r--r--src/kernel/net.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kernel/net.c b/src/kernel/net.c
index 7654bdc..6801659 100644
--- a/src/kernel/net.c
+++ b/src/kernel/net.c
@@ -848,6 +848,7 @@ int dnbd3_net_disconnect(struct dnbd3_device *dev)
if (!dev->socks) {
info_dev(dev, "not connected");
+ return 0;
}
dev->connected = false;