Commit 3554bef0 authored by Norby, Tom's avatar Norby, Tom

Memory management.

parent c8e1df9e
Pipeline #101215 passed with stages
in 7 minutes and 21 seconds
......@@ -261,6 +261,7 @@ QString SFTPFile::read(size_t nBytes)
if (nBytesRead < 0)
{
close();
delete[] buf;
return QString();
}
QString str(buf);
......
......@@ -258,6 +258,7 @@ void SessionWorker::requestExec(QString command)
{
radix_tagged_line("Failed to open channel");
emit execFailed("Failed to open a channel on the session.");
delete channel;
return;
}
......@@ -267,6 +268,7 @@ void SessionWorker::requestExec(QString command)
radix_tagged_line("Failed to request exec.");
emit execFailed("Failed to execute remote command.");
channel->close();
delete channel;
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment