0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05:00

patch 9.1.1455: Haiku: dailog objects created with no reference

Problem:  Haiku: dailog objects created with no reference
Solution: delete the objects before returning (jinyaoguo)

In the functions gui_mch_dialog() and gui_mch_font_dialog(), Dialog
objects are created but never escape the function scope. The call to
dialog->Go() only returns a boolean value and does not retain any
reference to the Dialog object itself, which may lead to potential
memory leak.

Fix this by deleting the object after using it.

closes: #17501

Signed-off-by: jinyaoguo <guo846@purdue.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
jinyaoguo
2025-06-11 21:30:01 +02:00
committed by Christian Brabandt
parent 51289207f8
commit ae31d7bfb4
2 changed files with 8 additions and 2 deletions

View File

@@ -709,6 +709,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1455,
/**/
1454,
/**/