diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-06-03 13:08:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-03 13:08:33 -0700 |
commit | 03b0e7d3a72a4a9be97b742fc3119ebb70ed9731 (patch) | |
tree | 1627f9966e3c187c3b266ece71f79944a8e0a911 /builtin/commit.c | |
parent | 9eaef5822cd76bbeb53b6479ce0ddaad34ee2b14 (diff) | |
parent | ebdbefa4fe9f618347124b37d44e517e0c6a3e4c (diff) |
Merge branch 'ps/leakfixes' into ps/leakfixes-more
* ps/leakfixes:
builtin/mv: fix leaks for submodule gitfile paths
builtin/mv: refactor to use `struct strvec`
builtin/mv duplicate string list memory
builtin/mv: refactor `add_slash()` to always return allocated strings
strvec: add functions to replace and remove strings
submodule: fix leaking memory for submodule entries
commit-reach: fix memory leak in `ahead_behind()`
builtin/credential: clear credential before exit
config: plug various memory leaks
config: clarify memory ownership in `git_config_string()`
builtin/log: stop using globals for format config
builtin/log: stop using globals for log config
convert: refactor code to clarify ownership of check_roundtrip_encoding
diff: refactor code to clarify memory ownership of prefixes
config: clarify memory ownership in `git_config_pathname()`
http: refactor code to clarify memory ownership
checkout: clarify memory ownership in `unique_tracking_name()`
strbuf: fix leak when `appendwholeline()` fails with EOF
transport-helper: fix leaking helper name
Diffstat (limited to 'builtin/commit.c')
-rw-r--r-- | builtin/commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 78bfae2164..f53e7e86ff 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -107,7 +107,7 @@ static enum { } commit_style; static const char *logfile, *force_author; -static const char *template_file; +static char *template_file; /* * The _message variables are commit names from which to take * the commit message and/or authorship. @@ -133,7 +133,7 @@ static struct strvec trailer_args = STRVEC_INIT; * is specified explicitly. */ static enum commit_msg_cleanup_mode cleanup_mode; -static const char *cleanup_arg; +static char *cleanup_arg; static enum commit_whence whence; static int use_editor = 1, include_status = 1; |