Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix several memory leaks - #15

Merged
avalentino merged 3 commits into
bcdev:masterfrom
dmarth:fix-memory-leaks
Aug 25, 2021
Merged

Fix several memory leaks#15
avalentino merged 3 commits into
bcdev:masterfrom
dmarth:fix-memory-leaks

Conversation

@dmarth

@dmarth dmarth commented Aug 25, 2021

Copy link
Copy Markdown
Contributor

In some cases memory is not freed correctly. Primarily this concerns error handling code that does not clean up partially initialized data structures.

I was not able to clean up all memory leaks reported by valgrind on the execution of epr_main_test, because some of the leaks are more fundamental to the design of the API than just error handling. One example is the record information, which is intentionally not freed unless it is assigned to a product. Test cases that call epr_parse_header directly never free the allocated memory. However, maybe this behavior can be accepted as it is covered by the high-level API.

Note: Parts of this pull request were provided by @WanzenBug.

Daniel Marth added 3 commits August 25, 2021 07:30
the issue addressed in this commit were initially identified and
fixed by @WanzenBug
@avalentino avalentino self-assigned this Aug 25, 2021
@avalentino
avalentino merged commit a5c2ef1 into bcdev:master Aug 25, 2021
@avalentino

Copy link
Copy Markdown
Collaborator

Thanks a lot @dmarth and @WanzenBug.

@dmarth
dmarth deleted the fix-memory-leaks branch August 26, 2021 07:18
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