Adding this issue here so I don't forget to fix it.
SNIConfigParams::get seems to be leaking on some scenarios, i.e.: When there is more than one matched subgroup, only the last group is released.
example:
sni:
- fqdn: '*.ok.*.com'",
tunnel_route: $2.example.$1.com"
The code will allocate memory for two subgroups and only release the last one.
This needs to be fixed and possibly we can work some improvements on the very same function function.