commit | 831962e3b32777573f3818c0917e7592bf3b462f | [log] [tgz] |
---|---|---|
author | Hubert Verstraete <hubs@users.sourceforge.net> | Tue Jun 28 22:44:26 2016 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Wed Jun 29 10:45:18 2016 +0200 |
tree | 3ebad00decf945da7d33e22d3627149905927a9e | |
parent | 2eae3a0497f01960dd7f4ffc638f11fc36aa5991 [diff] |
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.