diff options
| author | Russell Belfer <arrbee@arrbee.com> | 2011-11-17 15:10:27 -0800 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-11-22 01:53:56 +0100 |
| commit | b762e576c6d0118664320f50be2e5810dbed4c15 (patch) | |
| tree | 2c244a57ca5167386856c573336093744464daa6 /tests/t15-config.c | |
| parent | 1d09a1c88ddde32bf9b6b5ab6a9feab2ecdaa6ff (diff) | |
| download | libgit2-b762e576c6d0118664320f50be2e5810dbed4c15.tar.gz | |
filebuf: add GIT_FILEBUF_INIT and protect multiple opens and cleanups
Update all stack allocations of git_filebuf to use GIT_FILEBUF_INIT
and make git_filebuf_open and git_filebuf_cleanup safe to be called
multiple times on the same buffer.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'tests/t15-config.c')
| -rw-r--r-- | tests/t15-config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/t15-config.c b/tests/t15-config.c index a97f8206..9f0deb3e 100644 --- a/tests/t15-config.c +++ b/tests/t15-config.c @@ -306,7 +306,7 @@ END_TEST BEGIN_TEST(config16, "add a variable in a new section") git_config *cfg; int32_t i; - git_filebuf buf; + git_filebuf buf = GIT_FILEBUF_INIT; /* By freeing the config, we make sure we flush the values */ must_pass(git_config_open_ondisk(&cfg, CONFIG_BASE "/config10")); |
