diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-11-18 16:46:03 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-11-18 16:46:03 +0100 |
commit | ab8bf1009411c740efe3d8324b963f0e63c49eb8 (patch) | |
tree | b949a2dc4120e81cb762ded7c0c37b625a4a3694 /src | |
parent | turn off timeout when the passphrase has been entered (diff) | |
download | libpassphrase-ab8bf1009411c740efe3d8324b963f0e63c49eb8.tar.gz libpassphrase-ab8bf1009411c740efe3d8324b963f0e63c49eb8.tar.bz2 libpassphrase-ab8bf1009411c740efe3d8324b963f0e63c49eb8.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cerberus.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cerberus.c b/src/cerberus.c index 435a3a7..59bddfe 100644 --- a/src/cerberus.c +++ b/src/cerberus.c @@ -25,9 +25,6 @@ #endif -/* Free if declared */ -#define xfree(VAR) ({ if (VAR) free(VAR); }) - /** * Mane method @@ -51,7 +48,7 @@ int main(int argc, char** argv) begins entering the passphrase directly after the username. */ - /* Set proccess group ID */ + /* Set process group ID */ setpgrp(); @@ -148,19 +145,19 @@ int main(int argc, char** argv) /* Passphrase entered, turn off timeout */ alarm(0); - /* Wipe the passphrase from the memory */ + /* Wipe and free the passphrase from the memory */ if (skip_auth == 0) { long i; for (i = 0; *(passphrase + i); i++) *(passphrase + i) = 0; + free(passphrase); } /* Reset terminal settings */ reenable_echo(); - xfree(passphrase); return 0; } |