Skip to content
Snippets Groups Projects
Commit 6080737a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add/use realloc_or_free() instead of realloc() in some places

Where ever we assign the realloc() result to the same pointer we pass, use this new function instead to eliminate the cppcheck error reported by Nelgin:
Common realloc mistake: 'p' nulled but not freed upon failure  [memleakOnRealloc]

This isn't going to actually solve any memory leaks, it's just good practice for critical error (e.g. no memory error) handling.
parent 520dd313
No related branches found
No related tags found
No related merge requests found
Pipeline #5080 passed
Showing with 90 additions and 68 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment