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");
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to