diff options
author | Christian Hesse <mail@eworm.de> | 2014-03-15 17:29:56 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2014-03-15 17:29:56 +0100 |
commit | 565ff71af87b24c5746017ee51858fd8649beef9 (patch) | |
tree | 9346c718e579d99ee1aeff5ae26da798ed29797c | |
parent | 8257e4f7d9c5123ecc227a828a460e756e897567 (diff) | |
download | mkinitcpio-ykfde-565ff71af87b24c5746017ee51858fd8649beef9.tar.gz mkinitcpio-ykfde-565ff71af87b24c5746017ee51858fd8649beef9.tar.zst |
unlink challenge file only on success
-rw-r--r-- | udev/ykfde.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/udev/ykfde.c b/udev/ykfde.c index 1c45833..2077583 100644 --- a/udev/ykfde.c +++ b/udev/ykfde.c @@ -256,10 +256,11 @@ out30: free(challenge); out20: - /* close and unlink challenge file - * we can not try again later! */ + /* close the challenge file */ fclose(challengefile); - unlink(CHALLENGEFILE); + /* Unlink it if we were successful, we can not try again later! */ + if (ret == EXIT_SUCCESS) + unlink(CHALLENGEFILE); out10: return ret; |