@@ -81,6 +81,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;
@@ -102,7 +104,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;
@@ -118,7 +119,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;
}
@@ -228,9 +228,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;
}