X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=dir.c;h=3e345c2fc508eb82e66f4ffe2c825670f0bddd99;hb=c3b0dec509fe136c5417422f31898b5a4e2d5e02;hp=6b3273d1d18298dc6cb8c08b42948af05c775221;hpb=27ee189163070f53a87e033171a45520f70b242e;p=git.git diff --git a/dir.c b/dir.c index 6b3273d1d..3e345c2fc 100644 --- a/dir.c +++ b/dir.c @@ -169,7 +169,10 @@ static int add_excludes_from_file_1(const char *fname, } buf = xmalloc(size+1); if (read_in_full(fd, buf, size) != size) + { + free(buf); goto err; + } close(fd); if (buf_p)