Skip to content

Commit

Permalink
Merge pull request #1 from SashaXser/alert-autofix-96
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 96: Potential use after free
  • Loading branch information
SashaXser authored Nov 5, 2024
2 parents 2c5b7fe + 31771e5 commit ed71fca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion redalert/unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4400,8 +4400,10 @@ BulletClass* UnitClass::Fire_At(TARGET target, int which)

if (bullet != NULL) {
#ifdef FIXIT_CSII // checked - ajw 9/28/98
if (Class->Type == UNIT_DEMOTRUCK && IsActive)
if (Class->Type == UNIT_DEMOTRUCK && IsActive) {
delete this;
return NULL;
}
#endif
/*
** Possible reload timer set.
Expand Down

0 comments on commit ed71fca

Please sign in to comment.