diff options
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c index d8c657d6a7..b3d0f3c30b 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1824,9 +1824,10 @@ unmap: */ static void freshen_shared_index(char *base_sha1_hex, int warn) { - const char *shared_index = git_path("sharedindex.%s", base_sha1_hex); + char *shared_index = git_pathdup("sharedindex.%s", base_sha1_hex); if (!check_and_freshen_file(shared_index, 1) && warn) warning("could not freshen shared index '%s'", shared_index); + free(shared_index); } int read_index_from(struct index_state *istate, const char *path) |