From ed66c4df11a94e96d04a19b1002e20b632e939c5 Mon Sep 17 00:00:00 2001 From: Seinlin Li Date: Sun, 29 Jan 2023 09:06:08 -0800 Subject: [PATCH] Fix the memory leak problem for 211 c implementation. --- c/0211-design-add-and-search-words-data-structure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/0211-design-add-and-search-words-data-structure.c b/c/0211-design-add-and-search-words-data-structure.c index a0a181437..b251ca20a 100644 --- a/c/0211-design-add-and-search-words-data-structure.c +++ b/c/0211-design-add-and-search-words-data-structure.c @@ -63,7 +63,7 @@ void wordDictionaryFreeR(WordDictionary* dict) { int i; for (i = 0; i < 26; i++) { if (dict->c[i]) { - return wordDictionaryFreeR(dict->c[i]); + wordDictionaryFreeR(dict->c[i]); } } free(dict);