Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-06-07 20:54:33 +0400
committerRussell Belfer <rb@github.com>2013-06-07 20:54:33 +0400
commit3e9e6cdaff8acb11399736abbf793bf2d000d037 (patch)
tree4e1f3ed201309ae8a3668091e7952c26b6e7a836 /src/refdb.c
parent1a42dd17eb2c35fa572418f5958595cbe297d229 (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/refdb.c')
-rw-r--r--src/refdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refdb.c b/src/refdb.c
index 02244c908..4271b58e4 100644
--- a/src/refdb.c
+++ b/src/refdb.c
@@ -89,7 +89,7 @@ int git_refdb_compress(git_refdb *db)
static void refdb_free(git_refdb *db)
{
refdb_free_backend(db);
- memset(db, 0, sizeof(*db));
+ git__memset(db, 0, sizeof(*db));
git__free(db);
}