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 0a72f5ee7c, which is
2.5-dev10. This fix needs to be backported to 2.5+.
This commit is contained in:
Tim Duesterhus 2021-12-01 23:04:15 +01:00 committed by Christopher Faulet
parent d6ae912b04
commit caf5f5d302
1 changed files with 0 additions and 4 deletions

View File

@ -3584,10 +3584,6 @@ static int sample_conv_jwt_member_query(const struct arg *args, struct sample *s
if (item_num < member + 1)
goto end;
decoded_header = alloc_trash_chunk();
if (!decoded_header)
goto end;
ret = base64urldec(items[member].start, items[member].length,
decoded_header->area, decoded_header->size);
if (ret == -1)