This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/4820
gtp-kernel: proper cleanup in error path
When genl_socket_open() succeeds but genl_lookup_family() fails,
we have to clean up the socket that we just opened.
This requires a new version of libgtpnl :/
Change-Id: I31df046530347f88cb7b16c37a899b456ed1b080
---
M ggsn/gtp-kernel.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/20/4820/1
diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c
index 8f538a2..a35153e 100644
--- a/ggsn/gtp-kernel.c
+++ b/ggsn/gtp-kernel.c
@@ -68,6 +68,8 @@
if (gtp_nl.genl_id < 0) {
SYS_ERR(DGGSN, LOGL_ERROR, 0,
"cannot lookup GTP genetlink ID\n");
+ genl_socket_close(gtp_nl.nl);
+ gtp_nl.nl = NULL;
return -1;
}
SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id);
--
To view, visit https://gerrit.osmocom.org/4820
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I31df046530347f88cb7b16c37a899b456ed1b080
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>