diff --git a/opustags.c b/opustags.c index 3b52881..35deea6 100644 --- a/opustags.c +++ b/opustags.c @@ -462,6 +462,8 @@ int main(int argc, char **argv){ error = "opustags: invalid file"; if(error){ fprintf(stderr, "%s\n", error); + if(path_out != NULL && out != stdout) + remove(path_out); return EXIT_FAILURE; } return EXIT_SUCCESS;