summaryrefslogtreecommitdiffstats
path: root/lib/libgssapi/gss_add_cred.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-20 00:49:37 +0000
committerpfg <pfg@FreeBSD.org>2016-04-20 00:49:37 +0000
commitd17a279cbdc8f21d9229f8e80ccefab5e925143d (patch)
tree0b21dc0d06a73941b4c0772f4610bae9526e42d2 /lib/libgssapi/gss_add_cred.c
parent89c6fc4bee45c341529e586ec35efae29be510a8 (diff)
downloadFreeBSD-src-d17a279cbdc8f21d9229f8e80ccefab5e925143d.zip
FreeBSD-src-d17a279cbdc8f21d9229f8e80ccefab5e925143d.tar.gz
MFC 297942:
libgssapi: avoid NULL pointer dereferences. While here also use NULL instead of zero for pointers.
Diffstat (limited to 'lib/libgssapi/gss_add_cred.c')
-rw-r--r--lib/libgssapi/gss_add_cred.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libgssapi/gss_add_cred.c b/lib/libgssapi/gss_add_cred.c
index 4dcca18..34e29b1 100644
--- a/lib/libgssapi/gss_add_cred.c
+++ b/lib/libgssapi/gss_add_cred.c
@@ -121,7 +121,7 @@ gss_add_cred(OM_uint32 *minor_status,
* gss_add_cred for that mechanism, otherwise we copy the mc
* to new_cred.
*/
- target_mc = 0;
+ target_mc = NULL;
if (cred) {
SLIST_FOREACH(mc, &cred->gc_mc, gmc_link) {
if (gss_oid_equal(mc->gmc_mech_oid, desired_mech)) {
@@ -151,7 +151,7 @@ gss_add_cred(OM_uint32 *minor_status,
return (major_status);
}
} else {
- mn = 0;
+ mn = NULL;
}
m = _gss_find_mech_switch(desired_mech);
OpenPOWER on IntegriCloud