diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-06-11 11:19:22 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-11 22:15:04 +0200 |
commit | 14da26230a7644a2f9dfbc3f43d9d7ab6e0074e9 (patch) | |
tree | 600341b6864236888a6508a79bf46e97436ded8b /t/t4253-am-keep-cr-dos.sh | |
parent | revision: fix memory leak when reversing revisions (diff) | |
download | git-14da26230a7644a2f9dfbc3f43d9d7ab6e0074e9.tar.xz git-14da26230a7644a2f9dfbc3f43d9d7ab6e0074e9.zip |
parse-options: fix leaks for users of OPT_FILENAME
The `OPT_FILENAME()` option will, if set, put an allocated string into
the user-provided variable. Consequently, that variable thus needs to be
free'd by the caller of `parse_options()`. Some callsites don't though
and thus leak memory. Fix those.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4253-am-keep-cr-dos.sh')
-rwxr-xr-x | t/t4253-am-keep-cr-dos.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t4253-am-keep-cr-dos.sh b/t/t4253-am-keep-cr-dos.sh index 0ee69d2a0c..2bcdd9f34f 100755 --- a/t/t4253-am-keep-cr-dos.sh +++ b/t/t4253-am-keep-cr-dos.sh @@ -9,6 +9,7 @@ test_description='git-am mbox with dos line ending. GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh # Three patches which will be added as files with dos line ending. |