Commit 330346d5 authored by Marc Hoersken's avatar Marc Hoersken
Browse files

curl_schannel.c: Fixed possible memory or handle leak

First try to fix possible memory leaks, in this case:
Only connssl->ctxt xor onnssl->cred being initialized.
parent 8128db9e
Loading
Loading
Loading
Loading
+20 −20
Original line number Diff line number Diff line
@@ -1145,6 +1145,7 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
              " (bytes written: %zd)\n", curl_easy_strerror(code), written);
      }
    }
  }

  /* free SSPI Schannel API security context handle */
  if(connssl->ctxt) {
@@ -1169,7 +1170,6 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
      Curl_safefree(connssl->cred);
    }
  }
  }

  /* free internal buffer for received encrypted data */
  if(connssl->encdata_buffer != NULL) {