fix(coverity/530033): free lp->sl_info to fix resource leak #36198

This commit is contained in:
Ethan Praeter
2025-10-15 17:43:31 -04:00
committed by GitHub
parent 7bf12db0c8
commit 0791594101

View File

@@ -681,6 +681,7 @@ slang_T *spell_load_file(char *fname, char *lang, slang_T *old_lp, bool silent)
res = 0;
switch (n) {
case SN_INFO:
XFREE_CLEAR(lp->sl_info);
lp->sl_info = read_string(fd, (size_t)len); // <infotext>
if (lp->sl_info == NULL) {
goto endFAIL;