[geany/geany-plugins] 2e42db: spellcheck: Fix memory leak on duplicate dictionaries

Philipp Wiesemann git-noreply at xxxxx
Sat Aug 27 17:50:01 UTC 2016


Branch:      refs/heads/master
Author:      Philipp Wiesemann <philippwiesemann at users.noreply.github.com>
Committer:   Philipp Wiesemann <philippwiesemann at users.noreply.github.com>
Date:        Sat, 27 Aug 2016 17:50:01 UTC
Commit:      2e42db212f2a392bfc5d4c4c1c51f3c24e5e0dd7
             https://github.com/geany/geany-plugins/commit/2e42db212f2a392bfc5d4c4c1c51f3c24e5e0dd7

Log Message:
-----------
spellcheck: Fix memory leak on duplicate dictionaries


Modified Paths:
--------------
    spellcheck/src/speller.c

Modified: spellcheck/src/speller.c
3 lines changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -388,7 +388,10 @@ static void add_dict_array(const gchar* const lang_tag, const gchar* const provi
 	for (i = 0; i < sc_info->dicts->len; i++)
 	{
 		if (utils_str_equal(g_ptr_array_index(sc_info->dicts, i), result))
+		{
+			g_free(result);
 			return;
+		}
 	}
 
 	g_ptr_array_add(sc_info->dicts, result);



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list