summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-04-14 11:49:07 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-04-14 11:49:07 -0700
commit011cb58bfba9b8784103c044ea1a6d578d2d3441 (patch)
tree5dc960b06df2dbf0ef9c15e8c8e98ce127db6b05
parentMerge branch 'pt/enter-repo-comment-fix' (diff)
parentwt-status.c: fix a memleak (diff)
downloadtgif-011cb58bfba9b8784103c044ea1a6d578d2d3441.tar.xz
Merge branch 'sb/plug-wt-shortstatus-tracking-leak'
* sb/plug-wt-shortstatus-tracking-leak: wt-status.c: fix a memleak
-rw-r--r--wt-status.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wt-status.c b/wt-status.c
index 853419f05f..38cb165f12 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1550,6 +1550,7 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)
base = shorten_unambiguous_ref(base, 0);
color_fprintf(s->fp, header_color, "...");
color_fprintf(s->fp, branch_color_remote, "%s", base);
+ free((char *)base);
if (!upstream_is_gone && !num_ours && !num_theirs) {
fputc(s->null_termination ? '\0' : '\n', s->fp);