aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-02-11 16:40:43 +0600
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-02-11 16:40:48 +0600
commit7baef66a612651cccc656810790e58678af70b3b (patch)
treee744417c7d543e7d9440efed294fcd9fde1d068e /openbsc/src
parent83fbbeb56c45d84321fa3218c8afd5b3644a2ca2 (diff)
libbsc: fix potential null-dereference in abis_nm_perform_test()HEADmaster
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libbsc/abis_nm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index 922c2d54a..c1e2b5347 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -1993,6 +1993,8 @@ int abis_nm_perform_test(struct gsm_bts *bts, uint8_t obj_class,
if (!msg)
msg = nm_msgb_alloc();
+ if (!msg)
+ return -ENOMEM;
msgb_tv_push(msg, NM_ATT_AUTON_REPORT, auton_report);
msgb_tv_push(msg, NM_ATT_TEST_NO, test_nr);