X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diffcore-pickaxe.c;h=c4a77d71da5602b68c541c2487fcbecfdfff2944;hb=1654a3ba0c3a91ee3c0f38c922e3d2d1255ec868;hp=de44adabf09dcb47090e7865d6cd77677115d2b6;hpb=85023577a8f4b540aa64aa37f6f44578c0c305a3;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; }