aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-08 01:21:16 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-08 01:21:16 +0100
commit909d716a1e6d0c03b61b2a73ad3c2bd20fa55cf2 (patch)
tree268648d5fc0b10310b831359efc8c634c4546777 /Makefile
parent8e7557ef7a9a10781c79948afa69294afbdde10a (diff)
downloaddynstr-909d716a1e6d0c03b61b2a73ad3c2bd20fa55cf2.tar.gz
dynstr.c: Fix memory leak if realloc(3) fails
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 'Makefile')
0 files changed, 0 insertions, 0 deletions