[gegl] gegl: Fix valgrind warnings with gegl_buffer_save()
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl: Fix valgrind warnings with gegl_buffer_save()
- Date: Fri, 23 Jul 2010 09:55:00 +0000 (UTC)
commit 1ac8325a642f7a9a5fab27084bb58c341c6fdca4
Author: Martin Nordholts <martinn src gnome org>
Date: Fri Jul 23 11:35:53 2010 +0200
gegl: Fix valgrind warnings with gegl_buffer_save()
Initialize some memory to avoid valgrind complaints.
gegl/buffer/gegl-buffer-save.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-save.c b/gegl/buffer/gegl-buffer-save.c
index 56d2815..faccd39 100644
--- a/gegl/buffer/gegl-buffer-save.c
+++ b/gegl/buffer/gegl-buffer-save.c
@@ -77,7 +77,7 @@ gegl_tile_entry_new (gint x,
gint y,
gint z)
{
- GeglBufferTile *entry = g_malloc (sizeof(GeglBufferTile));
+ GeglBufferTile *entry = g_malloc0 (sizeof(GeglBufferTile));
entry->block.flags = GEGL_FLAG_TILE;
entry->block.length = sizeof (GeglBufferTile);
@@ -203,7 +203,8 @@ gegl_buffer_header_init (GeglBufferHeader *header,
header->tile_height = tile_height;
header->bytes_per_pixel = bpp;
{
- gchar buf[64];
+ gchar buf[64] = { 0, };
+
g_snprintf (buf, 64, "%s%c\n%iÃ?%i %ibpp\n%ix%i\n\n\n\n\n\n\n\n\n",
babl_get_name (format), 0,
header->tile_width,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]