MINOR: pattern: new sflag PAT_SF_REGFREE indicates regex_free() is needed
authorWilly Tarreau <w@1wt.eu>
Mon, 2 Nov 2020 18:16:23 +0000 (19:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Nov 2020 18:27:08 +0000 (19:27 +0100)
commit9b5c8bbc89541bee761e4c9eb9f8c5ba18c8a7b9
treedcc1cf21b6f172bb8354ec30f8e514d089b866fb
parentd4164dcd4acabe34106d8ea9fd3ce9da210ca0f0
MINOR: pattern: new sflag PAT_SF_REGFREE indicates regex_free() is needed

Currently we have no way to know how to delete/prune a pattern in a
generic way. A pattern doesn't contain its own type so we don't know
what function to call. Tree nodes are roughly OK but not lists where
regex are possible. Let's add one new bit for sflags at index time to
indicate that regex_free() will be needed upon deletion. It's not used
for now.
include/haproxy/pattern-t.h
src/pattern.c