BACKENDS: NETWORKING: Set pointer to nullptr when it's deleted
This avoids a UAF when file failed to open.
This commit is contained in:
parent
eeca688bfb
commit
376f978f57
1 changed files with 1 additions and 0 deletions
|
@ -58,6 +58,7 @@ void SessionRequest::openLocalFile(Common::String localFile) {
|
|||
ErrorResponse error(this, false, true, "SessionRequestFile: unable to open file to download into", -1);
|
||||
finishError(error);
|
||||
delete _localFile;
|
||||
_localFile = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue