aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
authorDS <vorunbekannt75@web.de>2020-03-10 20:32:38 +0100
committerGitHub <noreply@github.com>2020-03-10 20:32:38 +0100
commitb42493fb4c40611020c9ded9b7af5b96dc4148bd (patch)
treeb61a502308b865fa3c1160129339aea9df65a005 /src/gui/guiFormSpecMenu.cpp
parent7a7bfdca7c2dcbfe40467f64544112551abd7316 (diff)
downloadminetest-b42493fb4c40611020c9ded9b7af5b96dc4148bd.tar.gz
minetest-b42493fb4c40611020c9ded9b7af5b96dc4148bd.tar.bz2
minetest-b42493fb4c40611020c9ded9b7af5b96dc4148bd.zip
Fix memory leak in GUIHyperText (#9489)
Diffstat (limited to 'src/gui/guiFormSpecMenu.cpp')
-rw-r--r--src/gui/guiFormSpecMenu.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp
index e1bb58f17..45eb0d17c 100644
--- a/src/gui/guiFormSpecMenu.cpp
+++ b/src/gui/guiFormSpecMenu.cpp
@@ -1654,8 +1654,9 @@ void GUIFormSpecMenu::parseHyperText(parserData *data, const std::string &elemen
);
spec.ftype = f_Unknown;
- new GUIHyperText(
- spec.flabel.c_str(), Environment, this, spec.fid, rect, m_client, m_tsrc);
+ GUIHyperText *e = new GUIHyperText(spec.flabel.c_str(), Environment, this,
+ spec.fid, rect, m_client, m_tsrc);
+ e->drop();
m_fields.push_back(spec);
}