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

pppd:memory leaks occurs when Demand-dial,please conform! #27

Closed
wuleping opened this issue Nov 4, 2014 · 1 comment
Closed

pppd:memory leaks occurs when Demand-dial,please conform! #27

wuleping opened this issue Nov 4, 2014 · 1 comment

Comments

@wuleping
Copy link

wuleping commented Nov 4, 2014

pppd , demand.c , demand_conf()
When it never dials up ok, every demand-dial will apply a memory,but never free.
framemax = PPP_MRU;
framemax += PPP_HDRLEN + PPP_FCSLEN;
frame = malloc(framemax);

suggestion:
if (NULL == frame)
{
frame = malloc(framemax);
}

@paulusmack
Copy link
Collaborator

demand_conf() is only called once at program startup, not every time there is demand for the link, so there is no leak.

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

No branches or pull requests

2 participants