diff options
author | Russell Belfer <rb@github.com> | 2013-06-07 09:54:33 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-06-07 09:54:33 -0700 |
commit | 3e9e6cdaff8acb11399736abbf793bf2d000d037 (patch) | |
tree | 4e1f3ed201309ae8a3668091e7952c26b6e7a836 /src/cache.c | |
parent | 1a42dd17eb2c35fa572418f5958595cbe297d229 (diff) | |
download | libgit2-3e9e6cdaff8acb11399736abbf793bf2d000d037.tar.gz |
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/cache.c')
-rw-r--r-- | src/cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cache.c b/src/cache.c index afc7c5b3a..570838e44 100644 --- a/src/cache.c +++ b/src/cache.c @@ -107,7 +107,7 @@ void git_cache_free(git_cache *cache) git_cache_clear(cache); git_oidmap_free(cache->map); git_mutex_free(&cache->lock); - memset(cache, 0, sizeof(*cache)); + git__memset(cache, 0, sizeof(*cache)); } /* Called with lock */ |