mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-26 09:53:48 +00:00
Fixes hypothetical mem leak in network code (and an error in Cppcheck), patch by Riemer, fixes #2122
This was SVN commit r13980.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2011 Wildfire Games.
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -286,7 +286,11 @@ CFsmTransition* CFsm::AddTransition(
|
||||
|
||||
// Create new transition
|
||||
CFsmTransition* pNewTransition = new CFsmTransition( state );
|
||||
if ( !pNewTransition ) return NULL;
|
||||
if ( !pNewTransition )
|
||||
{
|
||||
delete pEvent;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Setup new transition
|
||||
pNewTransition->SetEvent( pEvent );
|
||||
|
||||
Reference in New Issue
Block a user