Patch 8.1.1944

12 views
Skip to first unread message

Bram Moolenaar

unread,
Aug 30, 2019, 10:30:58 AM8/30/19
to vim...@googlegroups.com

Patch 8.1.1944
Problem: Leaking memory when using sound callback.
Solution: Free the callback queue item.
Files: src/sound.c


*** ../vim-8.1.1943/src/sound.c 2019-08-15 23:05:46.042376801 +0200
--- src/sound.c 2019-08-30 16:28:15.167753088 +0200
***************
*** 171,176 ****
--- 171,177 ----
clear_tv(&rettv);

delete_sound_callback(scb->scb_callback);
+ vim_free(scb);
}
redraw_after_callback(TRUE);
}
***************
*** 263,272 ****
--- 264,284 ----
void
sound_free(void)
{
+ soundcb_queue_T *scb;
+
if (context != NULL)
ca_context_destroy(context);
+
while (first_callback != NULL)
delete_sound_callback(first_callback);
+
+ while (callback_queue != NULL)
+ {
+ scb = callback_queue;
+ callback_queue = scb->scb_next;
+ delete_sound_callback(scb->scb_callback);
+ vim_free(scb);
+ }
}
# endif

*** ../vim-8.1.1943/src/version.c 2019-08-30 15:46:27.192906157 +0200
--- src/version.c 2019-08-30 16:29:08.135417658 +0200
***************
*** 763,764 ****
--- 763,766 ----
{ /* Add new patch number below this line */
+ /**/
+ 1944,
/**/

--
hundred-and-one symptoms of being an internet addict:
138. You develop a liking for cold coffee.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages