dix: region: add comments on xfreeData()

Commenting a few aspects need to be considered when using this macro.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-05-06 14:11:04 +02:00
parent e3a213f63c
commit 076bc54064

View File

@ -167,6 +167,9 @@ Equipment Corporation.
((r1)->y1 <= (r2)->y1) && \
((r1)->y2 >= (r2)->y2) )
// note: we really need to check for size, because when it's zero, then data
// might point to RegionBrokenData (.data segment), which we must not free()
// (this also can create analyzer false alarms)
#define xfreeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data)
#define RECTALLOC_BAIL(pReg,n,bail) \