summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-03-22 12:30:44 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-03-26 20:17:21 -0400
commit40d4e954b09e6f08f101acf3d03937d2bd7d847e (patch)
treef4b55d30af78f7cf4526b1c7e935552d72e5757a
parentda0da0419e96fef0e79469328b1dfe1c28913838 (diff)
downloadsssd-40d4e954b09e6f08f101acf3d03937d2bd7d847e.tar.gz
sssd-40d4e954b09e6f08f101acf3d03937d2bd7d847e.tar.xz
sssd-40d4e954b09e6f08f101acf3d03937d2bd7d847e.zip
Always initialize the returned data in sss_krb5_princ_realm()
-rw-r--r--src/util/sss_krb5.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index 0031d2401..75ce2a59a 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -951,6 +951,9 @@ void sss_krb5_princ_realm(krb5_context context, krb5_const_principal princ,
if (data) {
*realm = data->data;
*len = data->length;
+ } else {
+ *realm = NULL;
+ *len = 0;
}
}
#endif