diff options
| author | Russell Belfer <rb@github.com> | 2013-03-14 13:50:54 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-03-14 13:50:54 -0700 |
| commit | d85296ab9b9c4a01adb35d4d2438b72177aeabc4 (patch) | |
| tree | 93f0fb0d155fd9ed571e3a5ab6a67ca37ba84607 /src/checkout.c | |
| parent | 0c46863384e9da3746b90ddf81eef6d25d475e5c (diff) | |
| download | libgit2-d85296ab9b9c4a01adb35d4d2438b72177aeabc4.tar.gz | |
Fix valgrind issues (and mmap fallback for diff)
This fixes a number of issues identified by valgrind - mostly
missed free calls. Inside valgrind, mmap() may fail which causes
some of the diff tests to fail. This adds a fallback code path
to diff_output.c:get_workdir_content() where is the mmap() fails
the code will now try to read the file data directly into allocated
memory (which is what it would do if the data needed to be filtered
anyhow).
Diffstat (limited to 'src/checkout.c')
| -rw-r--r-- | src/checkout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checkout.c b/src/checkout.c index 68ebbe31d..e52649aec 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -610,7 +610,7 @@ static int checkout_get_actions( if (act & CHECKOUT_ACTION__CONFLICT) counts[CHECKOUT_ACTION__CONFLICT]++; } - + error = checkout_remaining_wd_items(data, workdir, wditem, &pathspec); if (error < 0) goto fail; |
