mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-11 07:53:55 +00:00
Fixing memory leaks indicated by valgrind
This clears up the memory leaks that valgrind seems to find on my machine.
This commit is contained in:
parent
da9abdd6a7
commit
c19bc93cef
@ -624,5 +624,7 @@ int git_path_dirload_with_stat(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git_buf_free(&full);
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,8 @@ void test_config_multivar__replace(void)
|
|||||||
n = 0;
|
n = 0;
|
||||||
cl_git_pass(git_config_get_multivar(cfg, _name, NULL, cb, &n));
|
cl_git_pass(git_config_get_multivar(cfg, _name, NULL, cb, &n));
|
||||||
cl_assert(n == 2);
|
cl_assert(n == 2);
|
||||||
|
|
||||||
|
git_config_free(cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_config_multivar__replace_multiple(void)
|
void test_config_multivar__replace_multiple(void)
|
||||||
@ -145,4 +147,5 @@ void test_config_multivar__replace_multiple(void)
|
|||||||
cl_git_pass(git_config_get_multivar(cfg, _name, "otherplace", cb, &n));
|
cl_git_pass(git_config_get_multivar(cfg, _name, "otherplace", cb, &n));
|
||||||
cl_assert(n == 2);
|
cl_assert(n == 2);
|
||||||
|
|
||||||
|
git_config_free(cfg);
|
||||||
}
|
}
|
||||||
|
@ -158,6 +158,8 @@ void test_diff_workdir__to_tree(void)
|
|||||||
cl_assert(exp.line_adds == 12);
|
cl_assert(exp.line_adds == 12);
|
||||||
cl_assert(exp.line_dels == 4);
|
cl_assert(exp.line_dels == 4);
|
||||||
|
|
||||||
|
git_diff_list_free(diff);
|
||||||
|
|
||||||
git_tree_free(a);
|
git_tree_free(a);
|
||||||
git_tree_free(b);
|
git_tree_free(b);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user