From ab8bf1009411c740efe3d8324b963f0e63c49eb8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 18 Nov 2013 16:46:03 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/cerberus.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2