X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diffcore-pickaxe.c;h=c4a77d71da5602b68c541c2487fcbecfdfff2944;hb=1d431b22357389d0833830daf814ff0c4dc9189d;hp=de44adabf09dcb47090e7865d6cd77677115d2b6;hpb=6f38e0372266b5d674972e7039f8bd4156589558;p=git.git diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index de44adabf..c4a77d71d 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -14,6 +14,8 @@ static unsigned int contains(struct diff_filespec *one, const char *data; if (diff_populate_filespec(one, 0)) return 0; + if (!len) + return 0; sz = one->size; data = one->data; @@ -42,6 +44,7 @@ static unsigned int contains(struct diff_filespec *one, } } } + diff_free_filespec_data(one); return cnt; }