diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-07-13 14:00:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-13 14:00:27 -0700 |
commit | 313f52334b2b2b40ab0cedadaf081203de4284d7 (patch) | |
tree | a663c48426c9a6864ec046b3909462a8f1c7454f /config.c | |
parent | d790ba92cc534127fc4c0d58a901d1553835aa62 (diff) | |
parent | 7a64592cf8cc559d6043500b8e77d1fed07c5ec2 (diff) | |
download | git-313f52334b2b2b40ab0cedadaf081203de4284d7.tar.gz |
Merge branch 'kb/config-unmap-before-renaming'
"git config" failed to update the configuration file when the
underlying filesystem is incapable of renaming a file that is still
open.
* kb/config-unmap-before-renaming:
config.c: fix writing config files on Windows network shares
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2118,6 +2118,9 @@ int git_config_set_multivar_in_file(const char *config_filename, contents_sz - copy_begin) < contents_sz - copy_begin) goto write_err_out; + + munmap(contents, contents_sz); + contents = NULL; } if (commit_lock_file(lock) < 0) { |