aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-09-24 16:19:02 +0200
committerlynxis lazus <lynxis@fe80.eu>2020-09-26 19:58:50 +0000
commit772ca6195e752c79ef34086b4a41d786e2a921a1 (patch)
tree5042814ff988e84abe2ce23e19aac60259aa8485
parent4fb27a80d282a3768f3a6fec92c17b9b5669e3c7 (diff)
ns2: fix a msg leak when receiving REJECTED messages
-rw-r--r--src/gb/gprs_ns2_frgre.c4
-rw-r--r--src/gb/gprs_ns2_udp.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gb/gprs_ns2_frgre.c b/src/gb/gprs_ns2_frgre.c
index e2e0b29b..e0797b68 100644
--- a/src/gb/gprs_ns2_frgre.c
+++ b/src/gb/gprs_ns2_frgre.c
@@ -453,8 +453,8 @@ static int handle_nsfrgre_read(struct osmo_fd *bfd)
goto out;
case GPRS_NS2_CS_REJECTED:
/* nsip_sendmsg will free reject */
- frgre_sendmsg(bind, reject, &saddr);
- return 0;
+ rc = frgre_sendmsg(bind, reject, &saddr);
+ goto out;
case GPRS_NS2_CS_CREATED:
frgre_alloc_vc(bind, nsvc, &saddr, dlci);
gprs_ns2_vc_fsm_start(nsvc);
diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c
index bda0acff..251f869a 100644
--- a/src/gb/gprs_ns2_udp.c
+++ b/src/gb/gprs_ns2_udp.c
@@ -202,8 +202,8 @@ static int handle_nsip_read(struct osmo_fd *bfd)
goto out;
case GPRS_NS2_CS_REJECTED:
/* nsip_sendmsg will free reject */
- nsip_sendmsg(bind, reject, &saddr);
- return 0;
+ rc = nsip_sendmsg(bind, reject, &saddr);
+ goto out;
case GPRS_NS2_CS_CREATED:
ns2_driver_alloc_vc(bind, nsvc, &saddr);
gprs_ns2_vc_fsm_start(nsvc);