svn commit: r239099 - head/lib/libpam/modules/pam_krb5

Dimitry Andric dim at FreeBSD.org
Mon Aug 6 18:40:15 UTC 2012


Author: dim
Date: Mon Aug  6 18:40:14 2012
New Revision: 239099
URL: http://svn.freebsd.org/changeset/base/239099

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

Modified:
  head/lib/libpam/modules/pam_krb5/pam_krb5.c

Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.c
==============================================================================
--- head/lib/libpam/modules/pam_krb5/pam_krb5.c	Mon Aug  6 17:58:58 2012	(r239098)
+++ head/lib/libpam/modules/pam_krb5/pam_krb5.c	Mon Aug  6 18:40:14 2012	(r239099)
@@ -338,11 +338,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");
@@ -805,11 +805,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-head mailing list