Skip to content

Commit

Permalink
Fixed a nasty bug in B_DestroyAllClasses() which could allow anyone t…
Browse files Browse the repository at this point in the history
…o easily crash their system via the console.
  • Loading branch information
danij committed Mar 10, 2008
1 parent 3940854 commit 6576414
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions doomsday/engine/portable/src/b_class.c
Expand Up @@ -65,14 +65,17 @@ static bclass_t** bindClasses;
*/
void B_DestroyAllClasses(void)
{
int i;
int i;

for(i = 0; i < bindClassCount; ++i)
if(bindClasses)
{
B_DestroyClass(bindClasses[i]);
for(i = 0; i < bindClassCount; ++i)
{
B_DestroyClass(bindClasses[i]);
}
M_Free(bindClasses);
}
M_Free(bindClasses);
bindClasses = 0;
bindClasses = NULL;
bindClassCount = 0;
}

Expand Down

0 comments on commit 6576414

Please sign in to comment.