detect/flowbits: align all pointers in the struct

Makes leak sanitizer work without adding LSAN_OPTIONS=use_unaligned=1

Otherwise, leak sanitizer may report the read and black tree pointers
as leaked when it is still owned by some global variable.

Follow-up on d046e82db6
pull/14739/head
Philippe Antoine 9 months ago committed by Victor Julien
parent 3a9682fd48
commit 4b1b13960d

@ -1034,10 +1034,10 @@ static bool PrefilterFlowbitIsPrefilterable(const Signature *s)
* found. Part of a rb-tree. */
typedef struct PrefilterFlowbit {
uint32_t *rule_id; /**< array of signature iid that are part of this prefilter */
RB_ENTRY(PrefilterFlowbit) __attribute__((__packed__)) rb;
uint32_t id; /**< flowbit id */
uint32_t rule_id_size; /**< size in elements of `rule_id` */
uint32_t rule_id_cnt; /**< usage in elements of `rule_id` */
RB_ENTRY(PrefilterFlowbit) __attribute__((__packed__)) rb;
} __attribute__((__packed__)) PrefilterFlowbit;
static int PrefilterFlowbitCompare(const PrefilterFlowbit *a, const PrefilterFlowbit *b)

Loading…
Cancel
Save