1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

spell: remove check of NULL pointers before calling free() (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-24 23:52:45 +02:00
parent 3973258628
commit 1f104d06a0
3 changed files with 14 additions and 29 deletions
+5 -10
View File
@@ -125,10 +125,8 @@ spell_enchant_dict_describe_cb (const char *lang_tag,
weechat_printf (NULL, " %s", str_dict);
}
if (lang)
free (lang);
if (country)
free (country);
free (lang);
free (country);
}
#endif /* USE_ENCHANT */
@@ -197,10 +195,8 @@ spell_command_speller_list_dicts ()
weechat_printf (NULL, " %s", str_dict);
if (lang)
free (lang);
if (country)
free (country);
free (lang);
free (country);
}
delete_aspell_dict_info_enumeration (elements);
@@ -437,8 +433,7 @@ spell_command_cb (const void *pointer, void *data,
dicts = weechat_string_replace (argv_eol[2], " ", "");
spell_command_set_dict (buffer,
(dicts) ? dicts : argv[2]);
if (dicts)
free (dicts);
free (dicts);
return WEECHAT_RC_OK;
}