summaryrefslogtreecommitdiff
path: root/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'fetch.c')
-rw-r--r--fetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fetch.c b/fetch.c
index c256e6f6b4..b1c1f07b2a 100644
--- a/fetch.c
+++ b/fetch.c
@@ -222,8 +222,7 @@ int pull_targets_stdin(char ***target, const char ***write_ref)
char *rf_one = NULL;
char *tg_one;
- read_line(&buf, stdin, '\n');
- if (buf.eof)
+ if (strbuf_getline(&buf, stdin, '\n') == EOF)
break;
tg_one = buf.buf;
rf_one = strchr(tg_one, '\t');
@@ -239,6 +238,7 @@ int pull_targets_stdin(char ***target, const char ***write_ref)
(*write_ref)[targets] = rf_one ? xstrdup(rf_one) : NULL;
targets++;
}
+ strbuf_release(&buf);
return targets;
}