summaryrefslogtreecommitdiff
path: root/Documentation/howto/rebuild-from-update-hook.txt
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2014-06-19 17:29:48 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-06-19 15:20:56 -0700
commitf33206992de994424036a7d9912a968ab9829e6e (patch)
tree1d3c9a7bfafe5498ba00c7945942d9ed824f2dd6 /Documentation/howto/rebuild-from-update-hook.txt
parentmerge: use argv_array when spawning merge strategy (diff)
downloadtgif-f33206992de994424036a7d9912a968ab9829e6e.tar.xz
walker_fetch: fix minor memory leak
We sometimes allocate "msg" on the heap, but will fail to free it if we hit the failure code path. We can instead keep a separate variable that is safe to be freed no matter how we get to the failure code path. While we're here, we can also do two readability improvements: 1. Use xstrfmt instead of a manual malloc/sprintf 2. Due to the "maybe we allocate msg, maybe we don't" strategy, the logic for deciding which message to show was split into two parts. Since the deallocation is now pushed onto a separate variable, this is no longer a concern, and we can keep all of the logic in the same place. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/howto/rebuild-from-update-hook.txt')
0 files changed, 0 insertions, 0 deletions