Skip to content
Snippets Groups Projects
Commit d6888b0d authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix allocation size of client state

parent a12108c1
No related branches found
No related tags found
No related merge requests found
Pipeline #5113 failed
......@@ -8,6 +8,9 @@
void
sftpc_finish(sftpc_state_t state)
{
assert(state);
if (state == NULL)
return;
assert(state->thread == pthread_self());
// TODO: Close all open handles
while (!CloseEvent(state->recv_event)) {
......@@ -25,7 +28,7 @@ sftpc_finish(sftpc_state_t state)
sftpc_state_t
sftpc_begin(bool (*send_cb)(uint8_t *buf, size_t len, void *cb_data), void *cb_data)
{
sftpc_state_t ret = (sftpc_state_t)malloc(sizeof(sftpc_state_t));
sftpc_state_t ret = (sftpc_state_t)malloc(sizeof(struct sftp_client_state));
if (ret == NULL)
return NULL;
ret->recv_event = CreateEvent(NULL, TRUE, FALSE, "sftp_recv");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment