aboutsummaryrefslogtreecommitdiffstats
path: root/strbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/strbuf.c b/strbuf.c
index ace58e7367..977acba31b 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -472,6 +472,7 @@ int strbuf_getwholeline(struct strbuf *sb, FILE *fp, int term)
/* Translate slopbuf to NULL, as we cannot call realloc on it */
if (!sb->alloc)
sb->buf = NULL;
+ errno = 0;
r = getdelim(&sb->buf, &sb->alloc, term, fp);
if (r > 0) {