Skip to content

Commit

Permalink
fixup a memory leak in actions/undo.cpp
Browse files Browse the repository at this point in the history
This fixes up commit
64e69cd6#diff-f925ac8cf45da1ab4547b483379d9b75R253

Issue spotted by coverity static analysis tool.
  • Loading branch information
cbeck88 committed Jun 29, 2014
1 parent 97d5d14 commit 164d716
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/actions/undo.cpp
Expand Up @@ -265,7 +265,7 @@ undo_list::undo_action::create(const config & cfg, const std::string & tag)
map_location::parse_direction(cfg["starting_direction"]));
}

if ( str == "recruit" ) {
else if ( str == "recruit" ) {
// Validate the unit type.
const config & child = cfg.child("unit", tag);
const unit_type * u_type = unit_types.find(child["type"]);
Expand Down

0 comments on commit 164d716

Please sign in to comment.