Merge branch 'mm/log-branch-desc-plug-leak'
authorJunio C Hamano <gitster@pobox.com>
Tue, 9 Sep 2014 19:53:59 +0000 (12:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Sep 2014 19:53:59 +0000 (12:53 -0700)
* mm/log-branch-desc-plug-leak:
  builtin/log.c: fix minor memory leak

1  2 
builtin/log.c

diff --cc builtin/log.c
@@@ -861,9 -856,10 +861,10 @@@ static void add_branch_description(stru
        read_branch_desc(&desc, branch_name);
        if (desc.len) {
                strbuf_addch(buf, '\n');
 -              strbuf_add(buf, desc.buf, desc.len);
 +              strbuf_addbuf(buf, &desc);
                strbuf_addch(buf, '\n');
        }
+       strbuf_release(&desc);
  }
  
  static char *find_branch_name(struct rev_info *rev)