[babl] babl: make cache loading/parsing valgrind clean



commit 0a657ff09a6b5dc11a2fba8982feef31c5125694
Author: Øyvind Kolås <pippin gimp org>
Date:   Sat Aug 26 01:14:28 2017 +0200

    babl: make cache loading/parsing valgrind clean

 babl/babl-cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/babl/babl-cache.c b/babl/babl-cache.c
index abd6f0a..2b25628 100644
--- a/babl/babl-cache.c
+++ b/babl/babl-cache.c
@@ -214,7 +214,7 @@ babl_file_get_contents (const char  *path,
   size = ftell (file);
   if (length) *length = size;
   rewind (file);
-  buffer = malloc(size + 8);
+  buffer = calloc(size + 8, 1);
 
   if (!buffer)
     {


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