Skip to content

Commit

Permalink
Plug leak of ghost in chunk_copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardsEric authored and NickMcConnell committed Jun 3, 2024
1 parent 2e7bd35 commit c08282e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gen-chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ bool chunk_copy(struct chunk *dest, struct player *p, struct chunk *source,
continue;
} else {
/* Shift the ghost */
mem_free(dest->ghost);
dest->ghost = source->ghost;
source->ghost = NULL;
}
Expand Down

0 comments on commit c08282e

Please sign in to comment.