]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/plug-fmt-merge-msg-leak' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 5 Jun 2015 19:00:05 +0000 (12:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Jun 2015 19:00:05 +0000 (12:00 -0700)
* jc/plug-fmt-merge-msg-leak:
  fmt-merge-msg: plug small leak of commit buffer

1  2 
builtin/fmt-merge-msg.c

index 1d962dc569eaafc8429c4cec815922f382c576b9,9953007ef9de7c555f84486f0bdb3f45fe9dccbd..05f4c263112ae94978e4961988e9a4805fde2427
@@@ -256,6 -257,15 +253,15 @@@ static void record_person_from_buf(int 
        free(name_buf);
  }
  
 -      const char *buffer = get_commit_buffer(commit);
+ static void record_person(int which, struct string_list *people,
+                         struct commit *commit)
+ {
++      const char *buffer = get_commit_buffer(commit, NULL);
+       record_person_from_buf(which, people, buffer);
+       unuse_commit_buffer(commit, buffer);
+ }
  static int cmp_string_list_util_as_integral(const void *a_, const void *b_)
  {
        const struct string_list_item *a = a_, *b = b_;