diff options
author | Russell Belfer <rb@github.com> | 2013-06-07 20:54:33 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-06-07 20:54:33 +0400 |
commit | 3e9e6cdaff8acb11399736abbf793bf2d000d037 (patch) | |
tree | 4e1f3ed201309ae8a3668091e7952c26b6e7a836 /src/index.c | |
parent | 1a42dd17eb2c35fa572418f5958595cbe297d229 (diff) |
Add safe memset and use it
This adds a `git__memset` routine that will not be optimized away
and updates the places where I memset() right before a free() call
to use it.
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index abc9495bd..2bb7d6ee6 100644 --- a/src/index.c +++ b/src/index.c @@ -349,7 +349,7 @@ static void index_free(git_index *index) git__free(index->index_file_path); - memset(index, 0, sizeof(*index)); + git__memset(index, 0, sizeof(*index)); git__free(index); } |