summaryrefslogtreecommitdiff
path: root/tests/testrandom.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-16 08:52:18 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-16 08:52:18 -0500
commit42767fef6014797355745860e1d37f466e283da2 (patch)
treea079bdb829e5c3b4926f3b13a05c8384508e7f59 /tests/testrandom.c
parent67c7ec61c026161db0e942d140e138e20d33a59f (diff)
downloadpango-42767fef6014797355745860e1d37f466e283da2.tar.gz
Fix a small memleak
Our asan ci is unforgiving, and point out every memory leak.
Diffstat (limited to 'tests/testrandom.c')
-rw-r--r--tests/testrandom.c4
1 files changed, 3 insertions, 1 deletions
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);