BSC: Fix empty neighbor list in case of manual SI/SI5 mode
diff --git a/openbsc/src/system_information.c b/openbsc/src/system_information.c
index 1dc1bb0..8a99c56 100644
--- a/openbsc/src/system_information.c
+++ b/openbsc/src/system_information.c
@@ -209,11 +209,11 @@
 	else
 		bv = &bts->si_common.neigh_list;
 
-	/* Zero-initialize the bit-vector */
-	memset(bv->data, 0, bv->data_len);
-
 	/* Generate list of neighbor cells if we are in automatic mode */
 	if (bts->neigh_list_manual_mode == NL_MODE_AUTOMATIC) {
+		/* Zero-initialize the bit-vector */
+		memset(bv->data, 0, bv->data_len);
+
 		/* first we generate a bitvec of the BCCH ARFCN's in our BSC */
 		llist_for_each_entry(cur_bts, &bts->network->bts_list, list) {
 			if (cur_bts == bts)