We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf604e6 + 8528445 commit e579a5dCopy full SHA for e579a5d
notes-merge.c
@@ -681,7 +681,7 @@ int notes_merge_commit(struct notes_merge_options *o,
681
* Finally store the new commit object SHA1 into 'result_sha1'.
682
*/
683
struct dir_struct dir;
684
- const char *path = git_path(NOTES_MERGE_WORKTREE "/");
+ char *path = xstrdup(git_path(NOTES_MERGE_WORKTREE "/"));
685
int path_len = strlen(path), i;
686
const char *msg = strstr(partial_commit->buffer, "\n\n");
687
@@ -721,6 +721,7 @@ int notes_merge_commit(struct notes_merge_options *o,
721
result_sha1);
722
OUTPUT(o, 4, "Finalized notes merge commit: %s",
723
sha1_to_hex(result_sha1));
724
+ free(path);
725
return 0;
726
}
727
0 commit comments