diff options
| author | Jeff King <peff@peff.net> | 2020-08-17 17:33:13 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-08-17 15:35:47 -0700 |
| commit | 1c890016a147536e4a6faa5664eedd8765a01b32 (patch) | |
| tree | 7f6de87f5e77b296462cb526c3ef23972a243da7 /t/helper/test-run-command.c | |
| parent | 9a53219f69bd470053cf93c3f4d2a77b6d4df3e5 (diff) | |
| download | git-1c890016a147536e4a6faa5664eedd8765a01b32.tar.gz | |
config: fix leak in git_config_get_expiry_in_days()
We use git_config_get_string() to retrieve the expiry value in a newly
allocated string. But after parsing it, we never free it, leaking the
memory.
We could fix this with a free() obviously, but there's an even better
solution: we can use the non-allocating "tmp" variant of the function;
we only need it to be valid for the lifetime of our parse function.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-run-command.c')
0 files changed, 0 insertions, 0 deletions
