Allocate gNB_DU_ID before storing ID

Update the test so it would catch that bug. Check in eq_() that both
gNB_DU_IDs would be present, or not, using xor.
This commit is contained in:
Robert Schmidt
2025-04-24 18:42:06 +02:00
parent 4da30019be
commit 413b84b179
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -567,6 +567,8 @@ static void test_f1ap_du_configuration_update(void)
};
orig.cell_to_modify[0].sys_info = calloc_or_fail(1, sizeof(*orig.cell_to_modify[0].sys_info));
*orig.cell_to_modify[0].sys_info = sys_info;
orig.gNB_DU_ID = malloc_or_fail(sizeof(*orig.gNB_DU_ID));
*orig.gNB_DU_ID = 12;
F1AP_F1AP_PDU_t *f1enc = encode_f1ap_du_configuration_update(&orig);
F1AP_F1AP_PDU_t *f1dec = f1ap_encode_decode(f1enc);