arehbein has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmocore/+/32649 )
Change subject: core: Check return value of osmo_fd_register()
......................................................................
core: Check return value of osmo_fd_register()
Change-Id: I15bb456c42d5033c9cf4c0937df22fa02b6a6086
---
M src/core/tun.c
1 file changed, 13 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/32649/1
diff --git a/src/core/tun.c b/src/core/tun.c
index 4c9dec1..4fa3a7e 100644
--- a/src/core/tun.c
+++ b/src/core/tun.c
@@ -399,7 +399,10 @@
if (rc < 0)
goto err_close_tun;
- osmo_fd_register(&tundev->wqueue.bfd);
+ rc = osmo_fd_register(&tundev->wqueue.bfd);
+ if (rc < 0)
+ goto err_close_tun;
+
tundev->opened = true;
return 0;
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/32649
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I15bb456c42d5033c9cf4c0937df22fa02b6a6086
Gerrit-Change-Number: 32649
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: newchange