summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--range-diff.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/range-diff.c b/range-diff.c
index a83c386ffc..48d6e26f1a 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -80,6 +80,8 @@ static int read_patches(const char *range, struct string_list *list,
finish_command(&cp);
return -1;
}
+ if (finish_command(&cp))
+ return -1;
line = contents.buf;
size = contents.len;
@@ -101,7 +103,6 @@ static int read_patches(const char *range, struct string_list *list,
string_list_clear(list, 1);
strbuf_release(&buf);
strbuf_release(&contents);
- finish_command(&cp);
return -1;
}
util->matching = -1;
@@ -117,7 +118,6 @@ static int read_patches(const char *range, struct string_list *list,
string_list_clear(list, 1);
strbuf_release(&buf);
strbuf_release(&contents);
- finish_command(&cp);
return -1;
}
@@ -227,9 +227,6 @@ static int read_patches(const char *range, struct string_list *list,
strbuf_release(&buf);
free(current_filename);
- if (finish_command(&cp))
- return -1;
-
return 0;
}