BUG/MEDIUM: sample: Fix memory leak in sample_conv_jwt_member_query
authorTim Duesterhus <tim@bastelstu.be>
Wed, 1 Dec 2021 22:04:15 +0000 (23:04 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Dec 2021 08:07:35 +0000 (09:07 +0100)
commit26f4e1386de52c5e7c50e1d52231b09efb988759
treebfc243bc891ea9d0c35f1a0ac8f85b9a7cfc2240
parent9562b42de844f31225132ac97d1b7c5cee96a5d9
BUG/MEDIUM: sample: Fix memory leak in sample_conv_jwt_member_query

The function leaked one full buffer per invocation. Fix this by simply removing
the call to alloc_trash_chunk(), the static chunk from get_trash_chunk() is
sufficient.

This bug was introduced in 0a72f5ee7c2a61bdb379436461269315c776b50a, which is
2.5-dev10. This fix needs to be backported to 2.5+.

(cherry picked from commit caf5f5d3026e5cb00c1428242209624731eeee19)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/sample.c