Do not leak acquired_cred
[mod_auth_gssapi.git] / src / mod_auth_gssapi.c
index f2fab57..e65be4f 100644 (file)
@@ -299,7 +299,7 @@ static int mag_auth(request_rec *req)
     maj = gss_display_name(&min, client, &name, NULL);
     if (GSS_ERROR(maj)) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, req, "%s",
-                      mag_error(req, "gss_accept_sec_context() failed",
+                      mag_error(req, "gss_display_name() failed",
                                 maj, min));
         goto done;
     }
@@ -362,6 +362,7 @@ done:
                           "WWW-Authenticate", "Negotiate");
         }
     }
+    gss_release_cred(&min, &acquired_cred);
     gss_release_cred(&min, &delegated_cred);
     gss_release_buffer(&min, &output);
     gss_release_name(&min, &client);