In the previous code, there was a memory leak issue where the previously allocated memory was not freed upon a failed realloc operation. This commit addresses the problem by releasing the old memory before setting the pointer to NULL in case of a realloc failure. This ensures that memory is properly managed and avoids potential memory leaks.pull/24291/head
parent
157b0e7760
commit
e16ca08b33
1 changed files with 18 additions and 6 deletions
Loading…
Reference in new issue