Skip to content

Commit

Permalink
connect: fix memoryleak if the session is lost during connect
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <[email protected]>
  • Loading branch information
sahlberg committed Oct 6, 2024
1 parent b9d6b1f commit 59b4656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ int smb2_connect_share(struct smb2_context *smb2,
}

rc = smb2_connect_share_async(smb2, server, share, user, connect_cb, cb_data);

if (rc < 0) {
goto out;
}

rc = wait_for_reply(smb2, cb_data);
if (rc < 0) {
cb_data->status = SMB2_STATUS_CANCELLED;
free(cb_data);
return rc;
}

Expand Down

0 comments on commit 59b4656

Please sign in to comment.