[pango/rewrite-line-breaking] Fix a small memleak



commit 42767fef6014797355745860e1d37f466e283da2
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Nov 16 08:52:18 2021 -0500

    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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]