Commit 5f8fe2a2 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plugged a memory leak. (set_property): use g_value_dup_string (value)

2008-07-21  Sven Neumann  <sven@gimp.org>

	* gegl/buffer/gegl-tile-storage.c (gegl_tile_storage_finalize):
	plugged a memory leak.
	(set_property): use g_value_dup_string (value) instead of
	g_strdup (g_value_get_string (value)).

	* gegl/buffer/gegl-sampler-cubic.c (set_property): ditto.


svn path=/trunk/; revision=2533
parent 80a23cf9
2008-07-21 Sven Neumann <sven@gimp.org>
* gegl/buffer/gegl-tile-storage.c (gegl_tile_storage_finalize):
plugged a memory leak.
(set_property): use g_value_dup_string (value) instead of
g_strdup (g_value_get_string (value)).
* gegl/buffer/gegl-sampler-cubic.c (set_property): ditto.
2008-07-21 Sven Neumann <sven@gimp.org>
* gegl/buffer/gegl-buffer.c (gegl_buffer_new_from_format): plugged
......
......@@ -156,7 +156,7 @@ gegl_sampler_cubic_get (GeglSampler *self,
{
sampler_bptr += offsets[i];
factor = cubicKernel (y - v, cubic->b, cubic->c) *
cubicKernel (x - u, cubic->b, cubic->c);
cubicKernel (x - u, cubic->b, cubic->c);
newval4 += g4float_mul(&sampler_bptr[0], factor);
}
}
......@@ -189,7 +189,7 @@ get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
GeglSamplerCubic *self = GEGL_SAMPLER_CUBIC (object);
GeglSamplerCubic *self = GEGL_SAMPLER_CUBIC (object);
switch (prop_id)
{
......@@ -212,7 +212,7 @@ set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
GeglSamplerCubic *self = GEGL_SAMPLER_CUBIC (object);
GeglSamplerCubic *self = GEGL_SAMPLER_CUBIC (object);
switch (prop_id)
{
......@@ -221,12 +221,10 @@ set_property (GObject *object,
break;
case PROP_TYPE:
{
if (self->type)
g_free (self->type);
self->type = g_strdup (g_value_get_string (value));
self->type = g_value_dup_string (value);
break;
}
default:
break;
......
......@@ -146,7 +146,7 @@ set_property (GObject *gobject,
case PROP_PATH:
if (tile_storage->path)
g_free (tile_storage->path);
tile_storage->path = g_strdup (g_value_get_string (value));
tile_storage->path = g_value_dup_string (value);
break;
case PROP_FORMAT:
......@@ -170,7 +170,7 @@ tile_storage_idle (gpointer data)
return FALSE;
}
return gegl_tile_source_idle (GEGL_TILE_SOURCE (tile_storage));
return gegl_tile_source_idle (GEGL_TILE_SOURCE (tile_storage));
}
GeglTileBackend *gegl_buffer_backend (GObject *buffer);
......@@ -286,6 +286,9 @@ gegl_tile_storage_finalize (GObject *object)
if (self->idle_swapper)
g_source_remove (self->idle_swapper);
if (self->path)
g_free (self->path);
(*G_OBJECT_CLASS (parent_class)->finalize)(object);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment