0
0
mirror of https://github.com/vim/vim.git synced 2025-10-23 08:44:20 -04:00

patch 9.0.0999: memory may leak

Problem:    Memory may leak.
Solution:   Free the sound callback function name if it was allocated.
This commit is contained in:
Bram Moolenaar
2022-12-03 13:52:24 +00:00
parent 1b73edd9ee
commit c0370529c0
2 changed files with 4 additions and 0 deletions

View File

@@ -60,6 +60,8 @@ get_sound_callback(typval_T *arg)
soundcb->snd_next = first_callback;
first_callback = soundcb;
set_callback(&soundcb->snd_callback, &callback);
if (callback.cb_free_name)
vim_free(callback.cb_name);
}
return soundcb;
}