Skip to content

Fix memory leak during configuration parsing#455

Merged
hummeltech merged 2 commits intoopenstreetmap:masterfrom
hummeltech:MemoryLeak
Jun 29, 2024
Merged

Fix memory leak during configuration parsing#455
hummeltech merged 2 commits intoopenstreetmap:masterfrom
hummeltech:MemoryLeak

Conversation

@hummeltech
Copy link
Copy Markdown
Collaborator

The memory allocated by strndup needs to be freed.

The code has also been changed to not lose the allocation pointer and according to the semantics of strtok_r explained here:
https://man.freebsd.org/cgi/man.cgi?query=strtok_r

Also improved messaging.

rolandbosa and others added 2 commits June 28, 2024 19:44
The memory allocated by `strndup` needs to be freed.

The code has also been changed to not lose the allocation pointer and according to the semantics of `strtok_r` explained here:
https://man.freebsd.org/cgi/man.cgi?query=strtok_r
@hummeltech hummeltech merged commit 3120d0b into openstreetmap:master Jun 29, 2024
@hummeltech hummeltech deleted the MemoryLeak branch June 29, 2024 20:47
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.

2 participants