X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=strbuf.c;h=f03d11702b3f6212ca7305df60f2f9ea6ca49e35;hb=4af819d4cad206648b832f4d6103547981ab8004;hp=a88496030b7053a543173c299bd9f54b923db2ec;hpb=09236d80480c15f6da804e56a80c08d320475fb1;p=git.git diff --git a/strbuf.c b/strbuf.c index a88496030..f03d11702 100644 --- a/strbuf.c +++ b/strbuf.c @@ -260,7 +260,7 @@ size_t strbuf_fread(struct strbuf *sb, size_t size, FILE *f) res = fread(sb->buf + sb->len, 1, size, f); if (res > 0) strbuf_setlen(sb, sb->len + res); - else if (res < 0 && oldalloc == 0) + else if (oldalloc == 0) strbuf_release(sb); return res; }