diff --git a/utils/ticproc/ticproc.c b/utils/ticproc/ticproc.c index 3dcfc80..d993aa2 100644 --- a/utils/ticproc/ticproc.c +++ b/utils/ticproc/ticproc.c @@ -401,7 +401,9 @@ int process_tic_file(char *ticfilen) { if (ticfile.crc != NULL) { free(ticfile.crc); } - remove(ticfilename); + if (ret == 0) { + remove(ticfilename); + } return ret; }