diff -rupN curl-7.37.1/lib/http_negotiate_sspi.c curl-7.37.1-new/lib/http_negotiate_sspi.c
--- curl-7.37.1/lib/http_negotiate_sspi.c	2014-08-11 12:00:23.918229400 +0200
+++ curl-7.37.1-new/lib/http_negotiate_sspi.c	2014-08-12 10:16:03.856971700 +0200
@@ -119,7 +119,7 @@ int Curl_input_negotiate(struct connectd
     neg_ctx->gss = gss;
   }
 
-  if(neg_ctx->context && neg_ctx->status == SEC_E_OK) {
+  if(neg_ctx->state == GSS_AUTHSENT && neg_ctx->status == SEC_E_OK) {
     /* We finished successfully our part of authentication, but server
      * rejected it (since we're again here). Exit with an error since we
      * can't invent anything better */
@@ -274,6 +274,10 @@ CURLcode Curl_output_negotiate(struct co
 
 static void cleanup(struct negotiatedata *neg_ctx)
 {
+  if(neg_ctx->status == SEC_I_CONTINUE_NEEDED ||
+     neg_ctx->status == SEC_I_COMPLETE_AND_CONTINUE)
+    return;
+
   if(neg_ctx->context) {
     s_pSecFn->DeleteSecurityContext(neg_ctx->context);
     free(neg_ctx->context);
