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 58f75bc + 8528445 commit 8280bafCopy full SHA for 8280baf
notes-merge.c
@@ -680,7 +680,7 @@ int notes_merge_commit(struct notes_merge_options *o,
680
* Finally store the new commit object SHA1 into 'result_sha1'.
681
*/
682
struct dir_struct dir;
683
- const char *path = git_path(NOTES_MERGE_WORKTREE "/");
+ char *path = xstrdup(git_path(NOTES_MERGE_WORKTREE "/"));
684
int path_len = strlen(path), i;
685
const char *msg = strstr(partial_commit->buffer, "\n\n");
686
@@ -720,6 +720,7 @@ int notes_merge_commit(struct notes_merge_options *o,
720
result_sha1);
721
OUTPUT(o, 4, "Finalized notes merge commit: %s",
722
sha1_to_hex(result_sha1));
723
+ free(path);
724
return 0;
725
}
726
0 commit comments