ns2: fix a msg leak when receiving REJECTED messages

Change-Id: I7edc53c29c3dd09c395a275ceb8648b8eb19c06c
This commit is contained in:
Alexander Couzens 2020-09-24 16:19:02 +02:00 committed by lynxis lazus
parent 4fb27a80d2
commit 772ca6195e
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);