diff --git a/common/utils/oai_asn1.h b/common/utils/oai_asn1.h index 0f202bf699..4d7ea6c73f 100644 --- a/common/utils/oai_asn1.h +++ b/common/utils/oai_asn1.h @@ -78,6 +78,10 @@ // Prints an error if ID not found in list. #define RELEASE_IE_FROMLIST(SOURCE, TARGET, FIELD) \ do { \ + if (!TARGET) { \ + LOG_E(NR_MAC, "Target list not present, impossible to release element\n"); \ + break; \ + } \ for (int iI = 0; iI < SOURCE->list.count; iI++) { \ long eL = *SOURCE->list.array[iI]; \ int iJ; \