Skip to content

examples/proxy: free cd[1] stat buckets in handle_close#1585

Open
rootvector2 wants to merge 1 commit into
axboe:masterfrom
rootvector2:proxy-free-cd1-buckets
Open

examples/proxy: free cd[1] stat buckets in handle_close#1585
rootvector2 wants to merge 1 commit into
axboe:masterfrom
rootvector2:proxy-free-cd1-buckets

Conversation

@rootvector2
Copy link
Copy Markdown
Contributor

With -x (extended stats), each connection allocates rcv_bucket and snd_bucket for both c->cd[0] and c->cd[1] (examples/proxy.c:996), but handle_close only frees the cd[0] pair, leaking the cd[1] arrays on every teardown. Free them too, mirroring the existing cd[0] cleanup.

When extended stats are enabled (-x), the per-connection setup allocates
rcv_bucket and snd_bucket for both directions, c->cd[0] and c->cd[1].
handle_close() only frees the cd[0] pair, so the two cd[1] arrays leak on
every connection teardown. Free them too, mirroring the cd[0] cleanup.

Signed-off-by: rootvector2 <dxbnaveed.k@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant