Skip to content
Snippets Groups Projects
  • Rob Swindell's avatar
    19e7f21e
    Add/use realloc_or_free() instead of realloc() in some places · 19e7f21e
    Rob Swindell authored
    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.
    19e7f21e
    History
    Add/use realloc_or_free() instead of realloc() in some places
    Rob Swindell authored
    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.