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
wants to merge 1 commit into
base: branch-7-0
from

Conversation

Projects
None yet
2 participants
@gogglesguy
Contributor

gogglesguy commented Aug 24, 2015

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.

Fix memory leak when setting format options from mapfile
Before setting any formatoption from mapfile, make sure to free previous formatoptions as allocated by the default formats.
@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Sep 8, 2015

Member

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.

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 added a commit to tbonfort/mapserver that referenced this pull request Feb 24, 2016

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Feb 24, 2016

Member

closing, see #5255

Member

tbonfort commented Feb 24, 2016

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