diff options
author | Rubidium <rubidium@openttd.org> | 2021-05-09 22:51:26 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-10 16:03:31 +0200 |
commit | 296194ad36c601cf12d215a65d84222bbdf4de61 (patch) | |
tree | 99a0074d211257c2a5c29c40da75f23713eaf406 /src/signs_cmd.cpp | |
parent | 79fc094c54801bba83dc8aca2028fd6baf35965f (diff) | |
download | openttd-296194ad36c601cf12d215a65d84222bbdf4de61.tar.xz |
Fix: memory leak due to assigning result of strdup to a std::string
Diffstat (limited to 'src/signs_cmd.cpp')
-rw-r--r-- | src/signs_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/signs_cmd.cpp b/src/signs_cmd.cpp index a0843917d..6ffb6cda1 100644 --- a/src/signs_cmd.cpp +++ b/src/signs_cmd.cpp @@ -54,7 +54,7 @@ CommandCost CmdPlaceSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 si->y = y; si->z = GetSlopePixelZ(x, y); if (!StrEmpty(text)) { - si->name = stredup(text); + si->name = text; } si->UpdateVirtCoord(); InvalidateWindowData(WC_SIGN_LIST, 0, 0); |