diff options
author | Vicent Martà <vicent@github.com> | 2012-12-05 11:47:19 -0800 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2012-12-05 11:47:19 -0800 |
commit | e05ca13f1f3550f59790c0f992841abceee1b4c5 (patch) | |
tree | a01c119011d0c6020c9288096d09ed055c475bd8 /src/config_file.c | |
parent | a541eafa606b58e7ce3df8e496da8e032fdb74ec (diff) | |
parent | ee1c33b146a366260a4648b1f29f470fedaca0fa (diff) | |
download | libgit2-e05ca13f1f3550f59790c0f992841abceee1b4c5.tar.gz |
Merge pull request #1115 from ben/struct-versions
Version info for public structs
Diffstat (limited to 'src/config_file.c')
-rw-r--r-- | src/config_file.c | 4 |
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); |