summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--udev/ykfde.c7
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;