neels has submitted this change. (
https://gerrit.osmocom.org/c/osmo-upf/+/28985 )
Change subject: add comment about fd cleanup
......................................................................
add comment about fd cleanup
Clarify that calling osmo_fd_close() is fine if no fd is open.
Related: SYS#5599
Change-Id: Ibd471485fde90a14fe19f558b38a49b0b7d62909
---
M src/osmo-upf/upf_gtp.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
laforge: Looks good to me, approved
diff --git a/src/osmo-upf/upf_gtp.c b/src/osmo-upf/upf_gtp.c
index 4a430cb..6280e45 100644
--- a/src/osmo-upf/upf_gtp.c
+++ b/src/osmo-upf/upf_gtp.c
@@ -449,6 +449,7 @@
while ((t = llist_first_entry_or_null(&dev->tunnels, struct upf_gtp_tun,
entry)))
talloc_free(t);
llist_del(&dev->entry);
+ /* osmo_fd_close() is a noop if ofd.fd == -1 */
osmo_fd_close(&dev->gtpv0.ofd);
osmo_fd_close(&dev->gtpv1.ofd);
if (dev->created)
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit
https://gerrit.osmocom.org/c/osmo-upf/+/28985
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ibd471485fde90a14fe19f558b38a49b0b7d62909
Gerrit-Change-Number: 28985
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged