Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Defect] Memory leak in memcached.c:7757 #338

Closed
gangfan opened this issue Feb 12, 2018 · 3 comments
Closed

[Defect] Memory leak in memcached.c:7757 #338

gangfan opened this issue Feb 12, 2018 · 3 comments

Comments

@gangfan
Copy link

gangfan commented Feb 12, 2018

Our tool Pinpoint has found a memory leak defect in memcachd.c. The screenshots illustrate the detailed program steps that can trigger this memory leak defect.

Description:
The memory allocated on line 7676 is stored to pointer temp_portnumber_filename. If the fopen call fails on line 7681, which makes the pointer portnumber_file to be nullptr. In this case, the free call on line 7713 will be skipped and the memory leaked.

image
image
image
image

Gang
Sourcebrella & HKUST

@phuongkt
Copy link

y

dormando added a commit that referenced this issue Feb 20, 2018
issue #338 reported a memory leak in the init code. another non-issue, since
it's a handful of bytes and that code path is only used in a couple of tests.
@dormando
Copy link
Member

fixed in next. another non-issue, since that code is only executed from a specific test or two, and executes once in startup.

@dormando
Copy link
Member

went out in 1.5.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants