Skip to content

Commit

Permalink
Merge pull request #269 from yngty/master
Browse files Browse the repository at this point in the history
Fix connection timeout or failure memory leak
  • Loading branch information
sahlberg authored Aug 10, 2023
2 parents 04011e4 + 7c4dd91 commit 99125c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,11 @@ void smb2_destroy_context(struct smb2_context *smb2)
if (smb2->dirs) {
smb2_free_all_dirs(smb2);
}

if (smb2->connect_cb) {
smb2->connect_cb(smb2, SMB2_STATUS_CANCELLED,
NULL, smb2->connect_data);
smb2->connect_cb = NULL;
}
free(smb2->session_key);
smb2->session_key = NULL;

Expand Down

0 comments on commit 99125c9

Please sign in to comment.