]> git.99rst.org Git - git.git/commit
builtin/stash: fix leaking `pathspec_from_file`
authorPatrick Steinhardt <redacted>
Mon, 30 Sep 2024 09:13:30 +0000 (11:13 +0200)
committerJunio C Hamano <redacted>
Mon, 30 Sep 2024 18:23:04 +0000 (11:23 -0700)
commit64fe1e4a8c8731919b0bb26f6e8b9f8a0f4b0477
tree2a1e2b7ba2530df32dcf039f029b48c6c467c144
parent5cca114973c602c9f8516e9ed34c76fd75fb999e
builtin/stash: fix leaking `pathspec_from_file`

The `OPT_PATHSPEC_FROM_FILE()` option maps to `OPT_FILENAME()`, which we
know will always allocate memory when passed. We never free the memory
though, causing a memory leak. Plug it.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/stash.c
t/t3909-stash-pathspec-file.sh
git clone https://git.99rst.org/PROJECT