diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2017-05-04 15:58:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-08 12:18:20 +0900 |
commit | 5026b471751092ab971f3d4ae46320bc8ce40ff5 (patch) | |
tree | 56917f1973c1e3f89ca6ed3919b53fb33c25e3a5 /remote.c | |
parent | 7c565a6b2d8bf7fe989c85dc75df7fabc8113f40 (diff) | |
download | git-5026b471751092ab971f3d4ae46320bc8ce40ff5.tar.gz |
add_reflog_for_walk: avoid memory leak
We free()d the `log` buffer when dwim_log() returned 1, but not when it
returned a larger value (which meant that it still allocated the buffer
but we simply ignored it).
While in the vicinity, make sure that the `reflogs` structure as well as
the `branch` variable are released properly, too.
Identified by Coverity.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
0 files changed, 0 insertions, 0 deletions