From ba6fd4f8e4121cab3dde8511b62cc1392e6e95e0 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 7 Apr 2023 18:22:38 +0700 Subject: [PATCH] si2quater: check return value of osmo_earfcn_del() Change-Id: I227dad57737721c40a508f67616d9f5003bb1a3e Fixes: CID#313584 --- src/osmo-bsc/bts_vty.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 0ecb6d6ab..9ba3ac2e6 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -2078,7 +2078,9 @@ DEFUN_USRATTR(cfg_bts_si2quater_neigh_add, vty_out(vty, "%% Warning: not enough space in SI2quater (%u/%u used) for a given EARFCN %u%s", bts->si2q_count, SI2Q_MAX_NUM, arfcn, VTY_NEWLINE); - osmo_earfcn_del(e, arfcn); + + if (osmo_earfcn_del(e, arfcn) != 0) + vty_out(vty, "%% Failed to roll-back adding EARFCN %u%s", arfcn, VTY_NEWLINE); return CMD_WARNING; }