summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-06-07 09:54:33 -0700
committerRussell Belfer <rb@github.com>2013-06-07 09:54:33 -0700
commit3e9e6cdaff8acb11399736abbf793bf2d000d037 (patch)
tree4e1f3ed201309ae8a3668091e7952c26b6e7a836 /src/diff.c
parent1a42dd17eb2c35fa572418f5958595cbe297d229 (diff)
downloadlibgit2-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/diff.c')
-rw-r--r--src/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c
index f1d1010b4..982d64051 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -464,7 +464,7 @@ static void diff_list_free(git_diff_list *diff)
git_pathspec_free(&diff->pathspec);
git_pool_clear(&diff->pool);
- memset(diff, 0, sizeof(*diff));
+ git__memset(diff, 0, sizeof(*diff));
git__free(diff);
}