smb: fix memory leak on early failure

... by making sure connection related data (->share) is stored in the
connection and not in the easy handle.

Detected by OSS-fuzz
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9369
Fixes #2769
Closes #2810
This commit is contained in:
Daniel Stenberg 2018-07-29 17:58:10 +02:00
parent fe60cbfbbf
commit 09e401e01b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 37 additions and 33 deletions

View file

@ -35,6 +35,7 @@ struct smb_conn {
enum smb_conn_state state;
char *user;
char *domain;
char *share;
unsigned char challenge[8];
unsigned int session_key;
unsigned short uid;