forked from github/server
memory leak: test_create_shiptype and coasts, again
This commit is contained in:
parent
42849170f4
commit
349a67ece3
|
@ -38,6 +38,7 @@ static void test_ship_not_allowed_in_coast(CuTest * tc)
|
|||
ttype = test_create_terrain("glacier", LAND_REGION | ARCTIC_REGION | WALK_INTO | SAIL_INTO);
|
||||
otype = test_create_terrain("ocean", SEA_REGION | SAIL_INTO);
|
||||
stype = test_create_shiptype("derp");
|
||||
free(stype->coasts);
|
||||
stype->coasts = (struct terrain_type **)calloc(2, sizeof(struct terrain_type *));
|
||||
|
||||
r1 = test_create_region(0, 0, ttype);
|
||||
|
|
Loading…
Reference in New Issue