Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I propose these changes, that should fix three issues detected from previous commits:
PR fix memory leak in decode-xml.c #930 prevents a memory leak by freeing
pi
structure, butpi->name
should be deleted before.At function 09e9f5b#diff-7c75ce14fc99e77cf2ac6208fbb99946R1233 a string is created and filled but it's not initialized. We'll write the last NULL character and declare the function as returning a constant string.
At PR fix common realloc mistake in custom_output_search_replace.c #931 a test to check that
realloc
returns a valid pointer is performed, but in case of error, old memory is freed and the loop continues using the variable pointing to an invalid address.os_realloc
checks whether memory is available and if it isn't, will make the program to exit.Best regards.