]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: fixed some usages of realloc leading to memory leak
authorHubert Verstraete <hubs@users.sourceforge.net>
Tue, 28 Jun 2016 20:44:26 +0000 (22:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 29 Jun 2016 08:45:18 +0000 (10:45 +0200)
commit831962e3b32777573f3818c0917e7592bf3b462f
tree3ebad00decf945da7d33e22d3627149905927a9e
parent2eae3a0497f01960dd7f4ffc638f11fc36aa5991
CLEANUP: fixed some usages of realloc leading to memory leak

Changed all the cases where the pointer passed to realloc is overwritten
by the pointer returned by realloc. The new function my_realloc2 has
been used except in function register_name. If register_name fails to
add a new variable because of an "out of memory" error, all the existing
variables remain valid. If we had used my_realloc2, the array of variables
would have been freed.
src/cfgparse.c
src/chunk.c
src/standard.c
src/vars.c