diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2013-02-27 14:47:39 -0600 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2013-02-27 15:35:52 -0600 |
| commit | 395509ffcd5007d8fa9ecccdf2090c5ed24c00e6 (patch) | |
| tree | 759a4fedeb4ebacff0aff57a02240ca7b54b8fa3 /src/checkout.c | |
| parent | 69903777862bfdb03855ec13b0b63d65e0ed5410 (diff) | |
| download | libgit2-395509ffcd5007d8fa9ecccdf2090c5ed24c00e6.tar.gz | |
don't dereference at the end of the workdir iterator
Diffstat (limited to 'src/checkout.c')
| -rw-r--r-- | src/checkout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/checkout.c b/src/checkout.c index 59cd218a9..eda3e0b4b 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -456,7 +456,7 @@ static int checkout_action( while (1) { if (!wd) return checkout_action_no_wd(data, delta); - + cmp = strcomp(wd->path, delta->old_file.path); /* 1. wd before delta ("a/a" before "a/b") @@ -475,6 +475,8 @@ static int checkout_action( /* case 2 - entry prefixed by workdir tree */ if (git_iterator_advance_into_directory(workdir, &wd) < 0) goto fail; + + *wditem_ptr = wd; continue; } @@ -608,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; |
