prevent access to NULL pointer in RELEASE_IE_FROMLIST

This commit is contained in:
francescomani
2025-03-27 10:55:03 +01:00
parent 1d479b2aa9
commit a164623fa3
+4
View File
@@ -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; \