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.
This commit is contained in:
Marc Hoersken
2014-10-04 18:24:23 +02:00
parent 8128db9ec1
commit 330346d51c

View File

@@ -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) {