From 42767fef6014797355745860e1d37f466e283da2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 16 Nov 2021 08:52:18 -0500 Subject: Fix a small memleak Our asan ci is unforgiving, and point out every memory leak. --- tests/testrandom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/testrandom.c b/tests/testrandom.c index 8d89c65d..ac5695ec 100644 --- a/tests/testrandom.c +++ b/tests/testrandom.c @@ -235,9 +235,11 @@ load_hunspell_words (const char *language) bytes = g_file_load_bytes (file, NULL, NULL, NULL); g_object_unref (file); if (bytes == NULL) - return FALSE; + return NULL;; words = g_strsplit (g_bytes_get_data (bytes, NULL), "\n", -1); + g_bytes_unref (bytes); + if (words == NULL || words[0] == NULL) { g_free (words); -- cgit v1.2.1