X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tfc_error.c;h=d74fd567c7cbe241d04395f7582376f22695cc3a;hb=f98c367a4cf1ed9f0c6d7620e3f1988596945495;hp=f69fdbe4ed0bf0800fcad4a101f14a3633f6a4e3;hpb=1b12ee27233bd358a40406b5a7799230647c5ab1;p=tfcrypt.git diff --git a/tfc_error.c b/tfc_error.c index f69fdbe..d74fd56 100644 --- a/tfc_error.c +++ b/tfc_error.c @@ -62,6 +62,8 @@ _ex: void xexit(int status) { + if (status > 1) goto _do_clean_and_exit; + xclose(sfd); if (do_ftrunc > TFC_NO_FTRUNC) { if (do_ftrunc == TFC_FTRUNC_TAIL) ftrunc_dfd = total_processed_dst; @@ -70,6 +72,7 @@ void xexit(int status) if (do_preserve_time) fcopy_matime(dfd, &s_stat); xclose(dfd); +_do_clean_and_exit: memset(srcblk, 0, sizeof(srcblk)); memset(dstblk, 0, sizeof(dstblk));