mirror of
https://github.com/curl/curl.git
synced 2026-08-24 10:43:32 +03:00
gsasl: fix potential double free
Also:
- require libgsasl 1.6.0+ (2010-12-14) for a `gsasl_finish()` that
handles a NULL argument.
Ref: b550032df8
Reported-by: Joshua Rogers (Aisle Research)
Closes #21609
This commit is contained in:
parent
eb9b253d66
commit
3da249e1f0
2 changed files with 6 additions and 0 deletions
|
|
@ -32,6 +32,10 @@
|
|||
|
||||
#include <gsasl.h>
|
||||
|
||||
#if GSASL_VERSION_NUMBER < 0x010600
|
||||
#error "requires libgsasl 1.6.0+"
|
||||
#endif
|
||||
|
||||
bool Curl_auth_gsasl_is_supported(struct Curl_easy *data,
|
||||
const char *mech,
|
||||
struct gsasldata *gsasl)
|
||||
|
|
@ -47,6 +51,7 @@ bool Curl_auth_gsasl_is_supported(struct Curl_easy *data,
|
|||
res = gsasl_client_start(gsasl->ctx, mech, &gsasl->client);
|
||||
if(res != GSASL_OK) {
|
||||
gsasl_done(gsasl->ctx);
|
||||
gsasl->ctx = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue