aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--passgen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/passgen.c b/passgen.c
index 6f3670d..88d4a76 100644
--- a/passgen.c
+++ b/passgen.c
@@ -213,7 +213,8 @@ cleanup:
#ifdef USE_WINCRYPT
CryptReleaseContext(win_rng, 0);
#endif
- if (grammar != grammar_buf)
+ /* TODO: this && kinda sucks, would like a better but still fast way */
+ if (grammar != grammar_buf && grammar != argv[1])
free(grammar);
if (password != password_buf)
free(password);