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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user