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:
Russell Belfer 2012-02-29 14:19:39 -08:00
parent da9abdd6a7
commit c19bc93cef
3 changed files with 7 additions and 0 deletions

View File

@ -624,5 +624,7 @@ int git_path_dirload_with_stat(
}
}
git_buf_free(&full);
return error;
}

View File

@ -123,6 +123,8 @@ void test_config_multivar__replace(void)
n = 0;
cl_git_pass(git_config_get_multivar(cfg, _name, NULL, cb, &n));
cl_assert(n == 2);
git_config_free(cfg);
}
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_assert(n == 2);
git_config_free(cfg);
}

View File

@ -158,6 +158,8 @@ void test_diff_workdir__to_tree(void)
cl_assert(exp.line_adds == 12);
cl_assert(exp.line_dels == 4);
git_diff_list_free(diff);
git_tree_free(a);
git_tree_free(b);
}