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

Fix memory leak when setting format options from mapfile #5149

Closed

Conversation

gogglesguy
Copy link
Contributor

Before setting any formatoption from mapfile, make sure to free previous formatoptions as allocated by the default formats.

This slightly modifies the behaviour. Previously it would always overwrite the numformatoptions and thus preventing any use of the default format options. Now it preserves the default format options if none are specified. I'm not sure what behaviour is required. It should be easy to change though if needed.

Before setting any formatoption from mapfile, make sure to free previous formatoptions as allocated by the default formats.
@tbonfort
Copy link
Member

tbonfort commented Sep 8, 2015

I think this patch needs to be reworked to use msSetOutputFormatOption calls instead of freeing/recreating the formatoption list from scratch. That will overwrite an existing key and keep the existing ones.

@tbonfort
Copy link
Member

closing, see #5255

@tbonfort tbonfort closed this Feb 24, 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

Successfully merging this pull request may close these issues.

None yet

2 participants