aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-04-19 03:30:15 +0200
committerlaforge <laforge@osmocom.org>2021-05-23 10:32:40 +0000
commita35c296b6be95f240fe9c4207e5eec8d7886ca61 (patch)
treefcf7a4bea9f8e9ae5bd70c6031538b009251fd67
parentadd RSL_CMOD_CRT_OSMO_TCH_VAMOS_Bm, RSL_CMOD_CRT_OSMO_TCH_VAMOS_Lm (diff)
downloadlibosmocore-a35c296b6be95f240fe9c4207e5eec8d7886ca61.tar.xz
libosmocore-a35c296b6be95f240fe9c4207e5eec8d7886ca61.zip
gprs_ns2: sns: fix del bind()
When the bind to be removed is not the last entry, it would remove the wrong SNS bind resulting in use-after-free memory. Change-Id: I79062d404ebba9d5c8f7f209bebde146fa08c71f
-rw-r--r--src/gb/gprs_ns2_sns.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index c6e80afd..296a2e72 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -1995,6 +1995,7 @@ int gprs_ns2_sns_del_bind(struct gprs_ns2_nse *nse,
if (tmp->bind == bind) {
llist_del(&tmp->list);
found = true;
+ break;
}
}