diff options
author | Casper Andersson <casper.casan@gmail.com> | 2022-10-01 19:01:31 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2022-10-01 20:09:57 +0200 |
commit | 8194c7d6c5489563cc1e73f4362864e434f85e2a (patch) | |
tree | f8fcd020eb2f706cda9e7ae064b3d7f3becde78f /completions/git@git.thomasvoss.com:center | |
parent | 4f4d8f03a9488e482ca59e8985c4a5d60ed82af3 (diff) |
Make buffer and size static to avoid memory leak
getline() allocates/reallocates memory dynamically. When center() is
called repeatedly it would leak memory. Make them static so the same
memory is reallocated all the time, and none is lost. No need to free
manually, let the OS take care of that.
Diffstat (limited to 'completions/git@git.thomasvoss.com:center')
0 files changed, 0 insertions, 0 deletions