BACKENDS: NETWORKING: Set pointer to nullptr when it's deleted

This avoids a UAF when file failed to open.
This commit is contained in:
Le Philousophe 2023-02-26 10:36:53 +01:00 committed by antoniou79
parent eeca688bfb
commit 376f978f57

View file

@ -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;
}