Fix pointer accessed after delete
This commit is contained in:
parent
37ce82dc13
commit
0f44a7da27
1 changed files with 2 additions and 2 deletions
|
@ -1312,8 +1312,8 @@ void CClientEditionModule::onUserComponentDownloaded(NLNET::IModuleProxy *sender
|
|||
|
||||
if (decompressionState != Z_OK)
|
||||
{
|
||||
nlwarning("Error: the downloaded user component is corrupted '%s'", component->Filename.c_str());
|
||||
delete component;
|
||||
nlwarning("Error: the downloaded user component is corrupted '%s' ", component->Filename.c_str());
|
||||
return;
|
||||
}
|
||||
component->UncompressedData[component->UncompressedDataLength] = '\0';
|
||||
|
|
Loading…
Reference in a new issue