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

mapfile.c: hashTableSubstituteString leaks memory #5325

Closed
gogglesguy opened this issue Sep 14, 2016 · 5 comments
Closed

mapfile.c: hashTableSubstituteString leaks memory #5325

gogglesguy opened this issue Sep 14, 2016 · 5 comments
Milestone

Comments

@gogglesguy
Copy link
Contributor

For the line:

msInsertHashTable(hash, key, msCaseReplaceSubstring(msStrdup(val), from, to));

The result of msCaseReplaceSubstring is never freed. HashTable stores a copy of it.

@tbonfort
Copy link
Member

Can you create a pull request/patch for this please ?

@gogglesguy
Copy link
Contributor Author

Something along the lines of this:
https://gist.github.com/gogglesguy/10c9745c98adff0bbd0ba93f777bf209

@tbonfort
Copy link
Member

Perfect! If you want your name in the commit logs create a pr with that, if not i'll apply myself. Thanks.

@gogglesguy
Copy link
Contributor Author

Just apply it!

tbonfort added a commit that referenced this issue Sep 15, 2016
@tbonfort
Copy link
Member

applied to branch-7-0, thanks @gogglesguy

@tbonfort tbonfort added this to the 7.0.2 Release milestone Sep 15, 2016
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

No branches or pull requests

2 participants