Fix pointer accessed after delete

hg/compatibility-develop
Jan Boon 6 years ago committed by GitHub
parent 37ce82dc13
commit 0f44a7da27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1312,8 +1312,8 @@ void CClientEditionModule::onUserComponentDownloaded(NLNET::IModuleProxy *sender
if (decompressionState != Z_OK) if (decompressionState != Z_OK)
{ {
delete component;
nlwarning("Error: the downloaded user component is corrupted '%s'", component->Filename.c_str()); nlwarning("Error: the downloaded user component is corrupted '%s'", component->Filename.c_str());
delete component;
return; return;
} }
component->UncompressedData[component->UncompressedDataLength] = '\0'; component->UncompressedData[component->UncompressedDataLength] = '\0';

Loading…
Cancel
Save