Git fork

Merge branch 'mh/maint-notes-merge-pathbuf-fix'

* mh/maint-notes-merge-pathbuf-fix:
notes_merge_commit(): do not pass temporary buffer to other function

+2 -1
+2 -1
notes-merge.c
··· 681 681 * Finally store the new commit object SHA1 into 'result_sha1'. 682 682 */ 683 683 struct dir_struct dir; 684 - const char *path = git_path(NOTES_MERGE_WORKTREE "/"); 684 + char *path = xstrdup(git_path(NOTES_MERGE_WORKTREE "/")); 685 685 int path_len = strlen(path), i; 686 686 const char *msg = strstr(partial_commit->buffer, "\n\n"); 687 687 ··· 721 721 result_sha1); 722 722 OUTPUT(o, 4, "Finalized notes merge commit: %s", 723 723 sha1_to_hex(result_sha1)); 724 + free(path); 724 725 return 0; 725 726 } 726 727