forked from aniani/vim
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;
|
soundcb->snd_next = first_callback;
|
||||||
first_callback = soundcb;
|
first_callback = soundcb;
|
||||||
set_callback(&soundcb->snd_callback, &callback);
|
set_callback(&soundcb->snd_callback, &callback);
|
||||||
|
if (callback.cb_free_name)
|
||||||
|
vim_free(callback.cb_name);
|
||||||
}
|
}
|
||||||
return soundcb;
|
return soundcb;
|
||||||
}
|
}
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
999,
|
||||||
/**/
|
/**/
|
||||||
998,
|
998,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user