diff options
| author | Tian Yuchen <cat@malon.dev> | 2026-07-14 11:25:16 +0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-07-14 07:30:23 -0700 |
| commit | 0201d2783e6317c7b76e9c511cbfcfa73fdc17b1 (patch) | |
| tree | fceece5a2087d624f0c4cd9c3ee87a1ca53f6d01 /t/t4013/diff.diff_initial..side | |
| parent | ab776a62a78576513ee121424adb19597fbb7613 (diff) | |
repository: introduce repo_config_values_clear()
As part of the ongoing libification effort, dynamically allocated
global configuration variables are being moved into
'struct repo_config_values'. To prevent memory leaks, we need a
destructor to free these heap-allocated variables when a repository
instance is torn down.
Introduce 'repo_config_values_clear()' in environment.c and invoke it
from 'repo_clear()' in repository.c. As a starting point, update this
new function to handle the cleanup of 'attributes_file'.
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Mentored-by: Olamide Caleb Bello <belkid98@gmail.com>
Signed-off-by: Tian Yuchen <cat@malon.dev>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions
