mirror of
https://github.com/neovim/neovim.git
synced 2026-05-05 13:35:02 +00:00
fix(coverity/530033): free lp->sl_info to fix resource leak #36198
This commit is contained in:
@@ -681,6 +681,7 @@ slang_T *spell_load_file(char *fname, char *lang, slang_T *old_lp, bool silent)
|
|||||||
res = 0;
|
res = 0;
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case SN_INFO:
|
case SN_INFO:
|
||||||
|
XFREE_CLEAR(lp->sl_info);
|
||||||
lp->sl_info = read_string(fd, (size_t)len); // <infotext>
|
lp->sl_info = read_string(fd, (size_t)len); // <infotext>
|
||||||
if (lp->sl_info == NULL) {
|
if (lp->sl_info == NULL) {
|
||||||
goto endFAIL;
|
goto endFAIL;
|
||||||
|
|||||||
Reference in New Issue
Block a user