mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-03 20:02:04 +00:00
submodule: fix potential leak in the tests
This commit is contained in:
parent
961861fafa
commit
adb58f7d64
@ -156,10 +156,9 @@ void refute__submodule_exists(
|
|||||||
git_repository *repo, const char *name, int expected_error,
|
git_repository *repo, const char *name, int expected_error,
|
||||||
const char *msg, const char *file, int line)
|
const char *msg, const char *file, int line)
|
||||||
{
|
{
|
||||||
git_submodule *sm;
|
|
||||||
clar__assert_equal(
|
clar__assert_equal(
|
||||||
file, line, msg, 1, "%i",
|
file, line, msg, 1, "%i",
|
||||||
expected_error, (int)(git_submodule_lookup(&sm, repo, name)));
|
expected_error, (int)(git_submodule_lookup(NULL, repo, name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int get_submodule_status(git_repository *repo, const char *name)
|
unsigned int get_submodule_status(git_repository *repo, const char *name)
|
||||||
|
Loading…
Reference in New Issue
Block a user