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

memory leak in pacparser_find_proxy() #22

Closed
manugarg opened this issue Sep 26, 2014 · 2 comments
Closed

memory leak in pacparser_find_proxy() #22

manugarg opened this issue Sep 26, 2014 · 2 comments

Comments

@manugarg
Copy link
Owner

From [email protected] on February 26, 2013 11:02:03

In pacparser-1.3.0, the function pacparser_find_proxy() in pacparser.c does a malloc of a "script" string and never frees it.  JS_EvaluateScript() must not free its parameter because just above that point it is called with a string constant instead of a malloced string.

Based on the fact that pacparser_just_find_proxy() does (in effect) a strdup() of the return value of pacparser_find_proxy(), I am assuming that the return value of the latter is freed by pacparser_cleanup().  It would be good to document the fact that the caller of pacparser_just_find_proxy() is responsible for freeing its returned string.

Original issue: http://code.google.com/p/pacparser/issues/detail?id=22

@manugarg
Copy link
Owner Author

From [email protected] on February 26, 2013 11:09:13

(No comment was entered for this change.)

@manugarg
Copy link
Owner Author

From manugarg on April 14, 2013 23:01:02

Patch committed as part of Issue 23 .

Status: Fixed

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

1 participant