4c520cefc90b10566fcc8a0b006287494a7770e1
Parents: d071f28cfa9a49f3aa6355b17e9d9fa7224ff49f
From: John Keeping <john@keeping.me.uk>
Date: Sun Feb 13 15:34:50 2022 +0700
global: use release_commit_memory()
Instead of calling two separate Git functions to free memory associated with a commit object, use Git's wrapper which does this. This also counts as a potential future bug fix since release_commit_memory() also resets the parsed state of the commit, meaning any attempt to use it in the future will correctly fill out the fields again. release_commit_memory() does not set parents to zero, so keep that for additional safety in case CGit checks this without calling parse_commit() again. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
ui-atom.c | +1/-2 |
ui-log.c | +2/-4 |
ui-stats.c | +1/-2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|