diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-03-04 02:06:19 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-03-04 03:03:15 +0100 |
| commit | 62bdf9f72f6a65b76bbb97ffa467e16217646cbc (patch) | |
| tree | e290a93f97ecbedcea1f7731de488f12ce5b5a42 /handler.h | |
| parent | d83e8ad1baaff1d445c96a269da89a833dfa5d91 (diff) | |
| download | slcl-62bdf9f72f6a65b76bbb97ffa467e16217646cbc.tar.gz | |
Fix memory leak on failed realloc(3)
According to C99 ยง7.20.3.4:
If memory for the new object cannot be allocated, the old object is not
deallocated and its value is unchanged.
Therefore, a temporary pointer must be used to ensure the original
object can still be deallocated should realloc(3) return a null pointer.
Diffstat (limited to 'handler.h')
0 files changed, 0 insertions, 0 deletions
