diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-05-27 13:46:15 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-05-27 20:19:59 +0200 |
commit | 6073b3b5c37716c50244d635e7c358f41f43e286 (patch) | |
tree | 6d3663eeb79e31b729d5a51ef9028ccb58848d3e /diff.c | |
parent | http: refactor code to clarify memory ownership (diff) | |
download | git-6073b3b5c37716c50244d635e7c358f41f43e286.tar.xz git-6073b3b5c37716c50244d635e7c358f41f43e286.zip |
config: clarify memory ownership in `git_config_pathname()`
The out parameter of `git_config_pathname()` is a `const char **` even
though we transfer ownership of memory to the caller. This is quite
misleading and has led to many memory leaks all over the place. Adapt
the parameter to instead be `char **`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -58,7 +58,7 @@ static int diff_context_default = 3; static int diff_interhunk_context_default; static const char *diff_word_regex_cfg; static const char *external_diff_cmd_cfg; -static const char *diff_order_file_cfg; +static char *diff_order_file_cfg; int diff_auto_refresh_index = 1; static int diff_mnemonic_prefix; static int diff_no_prefix; |