summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-04-14 11:49:07 -0700
committerJunio C Hamano <gitster@pobox.com>2015-04-14 11:49:07 -0700
commit011cb58bfba9b8784103c044ea1a6d578d2d3441 (patch)
tree5dc960b06df2dbf0ef9c15e8c8e98ce127db6b05 /wt-status.c
parentbf2cfcaabf1f7497ff283c221af9d8b3058867af (diff)
parent0e32d4b31f35d36dc78bb26fefac221605ca3e60 (diff)
downloadgit-011cb58bfba9b8784103c044ea1a6d578d2d3441.tar.gz
Merge branch 'sb/plug-wt-shortstatus-tracking-leak'
* sb/plug-wt-shortstatus-tracking-leak: wt-status.c: fix a memleak
Diffstat (limited to 'wt-status.c')
-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);