Merge remote branch 'origin/master' into HEAD
[moonshot.git] / moonshot / mech_eap / util_attr.cpp
index 01c3135..4ce40fa 100644 (file)
@@ -854,13 +854,15 @@ gssEapInquireName(OM_uint32 *minor,
         return GSS_S_UNAVAILABLE;
     }
 
-    try {
-        if (!name->attrCtx->getAttributeTypes(attrs)) {
-            *minor = GSSEAP_NO_ATTR_CONTEXT;
-            return GSS_S_UNAVAILABLE;
+    if (attrs != NULL) {
+        try {
+            if (!name->attrCtx->getAttributeTypes(attrs)) {
+                *minor = GSSEAP_NO_ATTR_CONTEXT;
+                return GSS_S_UNAVAILABLE;
+            }
+        } catch (std::exception &e) {
+            return name->attrCtx->mapException(minor, e);
         }
-    } catch (std::exception &e) {
-        return name->attrCtx->mapException(minor, e);
     }
 
     return GSS_S_COMPLETE;