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

Fix memory leak in sftp_opendir()

Found by Coverity.
parent bdbf6370
No related branches found
No related tags found
No related merge requests found
Pipeline #6037 passed
......@@ -1589,7 +1589,9 @@ sftp_opendir(sftp_str_t path, void *cb_data)
if (h == nullptr) {
return sftps_send_error(sbbs->sftp_state, SSH_FX_FAILURE, "Handle allocation failure");
}
return sftps_send_handle(sbbs->sftp_state, h);
bool ret = sftps_send_handle(sbbs->sftp_state, h);
free_sftp_str(h);
return ret;
}
// TODO: This is still too ugly... should be split into multiple functions.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment