summaryrefslogtreecommitdiffstats
path: root/lib/libpam
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-06 18:40:14 +0000
committerdim <dim@FreeBSD.org>2012-08-06 18:40:14 +0000
commit74a518dd3c33db9ca48c1cb01d6e0a71528e7845 (patch)
treeb9e186a09fe2816ddd85e93670ae9cb4620e042b /lib/libpam
parent387a0565b369c91140724c97b0b9b2d7cfcba741 (diff)
downloadFreeBSD-src-74a518dd3c33db9ca48c1cb01d6e0a71528e7845.zip
FreeBSD-src-74a518dd3c33db9ca48c1cb01d6e0a71528e7845.tar.gz
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
Diffstat (limited to 'lib/libpam')
-rw-r--r--lib/libpam/modules/pam_krb5/pam_krb5.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c
index 3d5105d..e547a3a 100644
--- a/lib/libpam/modules/pam_krb5/pam_krb5.c
+++ b/lib/libpam/modules/pam_krb5/pam_krb5.c
@@ -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");
OpenPOWER on IntegriCloud