svn commit: r239520 - stable/9/lib/libpam/modules/pam_krb5

Dimitry Andric dim at FreeBSD.org
Tue Aug 21 19:11:13 UTC 2012


Author: dim
Date: Tue Aug 21 19:11:12 2012
New Revision: 239520
URL: http://svn.freebsd.org/changeset/base/239520

Log:
  MFC r239099:
  
  Fix two instances in pam_krb5(8), where the variable 'princ_name' could
  be used uninitialized.
  
  Found by:	clang 3.2
  Reviewed by:	des

Modified:
  stable/9/lib/libpam/modules/pam_krb5/pam_krb5.c
Directory Properties:
  stable/9/lib/libpam/   (props changed)

Modified: stable/9/lib/libpam/modules/pam_krb5/pam_krb5.c
==============================================================================
--- stable/9/lib/libpam/modules/pam_krb5/pam_krb5.c	Tue Aug 21 19:07:28 2012	(r239519)
+++ stable/9/lib/libpam/modules/pam_krb5/pam_krb5.c	Tue Aug 21 19:11:12 2012	(r239520)
@@ -320,11 +320,11 @@ cleanup:
 	PAM_LOG("Done cleanup");
 cleanup2:
 	krb5_free_principal(pam_context, princ);
-	PAM_LOG("Done cleanup2");
-cleanup3:
 	if (princ_name)
 		free(princ_name);
+	PAM_LOG("Done cleanup2");
 
+cleanup3:
 	krb5_free_context(pam_context);
 
 	PAM_LOG("Done cleanup3");
@@ -779,11 +779,11 @@ cleanup:
 	PAM_LOG("Done cleanup");
 cleanup2:
 	krb5_free_principal(pam_context, princ);
-	PAM_LOG("Done cleanup2");
-cleanup3:
 	if (princ_name)
 		free(princ_name);
+	PAM_LOG("Done cleanup2");
 
+cleanup3:
 	krb5_free_context(pam_context);
 
 	PAM_LOG("Done cleanup3");


More information about the svn-src-stable mailing list