mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'ah/plugleaks'
Leak plugging. * ah/plugleaks: reset: clear_unpack_trees_porcelain to plug leak builtin/rebase: fix options.strategy memory lifecycle builtin/merge: free found_ref when done builtin/mv: free or UNLEAK multiple pointers at end of cmd_mv convert: release strbuf to avoid leak read-cache: call diff_setup_done to avoid leak ref-filter: also free head for ATOM_HEAD to avoid leak diffcore-rename: move old_dir/new_dir definition to plug leak builtin/for-each-repo: remove unnecessary argv copy to plug leak builtin/submodule--helper: release unused strbuf to avoid leak environment: move strbuf into block to plug leak fmt-merge-msg: free newly allocated temporary strings when done
This commit is contained in:
@@ -448,9 +448,9 @@ static void update_dir_rename_counts(struct dir_rename_info *info,
|
||||
const char *oldname,
|
||||
const char *newname)
|
||||
{
|
||||
char *old_dir = xstrdup(oldname);
|
||||
char *new_dir = xstrdup(newname);
|
||||
char new_dir_first_char = new_dir[0];
|
||||
char *old_dir;
|
||||
char *new_dir;
|
||||
const char new_dir_first_char = newname[0];
|
||||
int first_time_in_loop = 1;
|
||||
|
||||
if (!info->setup)
|
||||
@@ -475,6 +475,10 @@ static void update_dir_rename_counts(struct dir_rename_info *info,
|
||||
*/
|
||||
return;
|
||||
|
||||
|
||||
old_dir = xstrdup(oldname);
|
||||
new_dir = xstrdup(newname);
|
||||
|
||||
while (1) {
|
||||
int drd_flag = NOT_RELEVANT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user