summaryrefslogtreecommitdiff
path: root/src/config_file.c
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-11-29 14:07:50 -0800
committerBen Straub <bs@github.com>2012-11-30 13:12:14 -0800
commit691776213947e59a3928aab09e97a64b65e990ab (patch)
treebd35b8ff4af040b6350fe83f802d988c954525e9 /src/config_file.c
parentb81aa2f1deb98eb7f9e60ac96696e69a9a49d8f8 (diff)
downloadlibgit2-691776213947e59a3928aab09e97a64b65e990ab.tar.gz
Deploy git_config_backend version
Diffstat (limited to 'src/config_file.c')
-rw-r--r--src/config_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config_file.c b/src/config_file.c
index 354a91986..6e29832d4 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -545,10 +545,10 @@ int git_config_file__ondisk(git_config_backend **out, const char *path)
{
diskfile_backend *backend;
- backend = git__malloc(sizeof(diskfile_backend));
+ backend = git__calloc(1, sizeof(diskfile_backend));
GITERR_CHECK_ALLOC(backend);
- memset(backend, 0x0, sizeof(diskfile_backend));
+ backend->parent.version = GIT_CONFIG_BACKEND_VERSION;
backend->file_path = git__strdup(path);
GITERR_CHECK_ALLOC(backend->file_path);