From f49de037592adf9327e7645dd13996bd0ea7d842 Mon Sep 17 00:00:00 2001 From: jmallett Date: Wed, 22 May 2002 23:18:25 +0000 Subject: Free old_pwd only in the code path where it has been allocated. Reviewed by: des --- lib/libpam/modules/pam_unix/pam_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libpam') diff --git a/lib/libpam/modules/pam_unix/pam_unix.c b/lib/libpam/modules/pam_unix/pam_unix.c index dfd7b99..de7dcc8 100644 --- a/lib/libpam/modules/pam_unix/pam_unix.c +++ b/lib/libpam/modules/pam_unix/pam_unix.c @@ -420,6 +420,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, retval = PAM_SERVICE_ERR; } #endif + free(old_pwd); } else { /* Very bad juju */ @@ -427,7 +428,6 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, PAM_LOG("Illegal 'flags'"); } - free(old_pwd); return (retval); } -- cgit v1.1