summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-03 13:52:24 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-03 13:52:24 +0000
commitc0370529c027abc5b1698d53fcfb8c02a0c515da (patch)
treea95d20659ccf2b175433f78a935dbf4fa4246067
parent1b73edd9ee40aec400f3611f59823cec5fd1c489 (diff)
downloadvim-git-c0370529c027abc5b1698d53fcfb8c02a0c515da.tar.gz
patch 9.0.0999: memory may leakv9.0.0999
Problem: Memory may leak. Solution: Free the sound callback function name if it was allocated.
-rw-r--r--src/sound.c2
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/sound.c b/src/sound.c
index 17ff78ba3..edb606a2d 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -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;
}
diff --git a/src/version.c b/src/version.c
index da9b03a52..b3a8ba4eb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 999,
+/**/
998,
/**/
997,