summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vega/paint.c
diff options
context:
space:
mode:
authorAndreas Pokorny <[email protected]>2012-12-15 23:28:57 +0100
committerBrian Paul <[email protected]>2012-12-17 10:22:26 -0700
commitfd65fb5aa8cceee151965c383283b038b78562cb (patch)
tree51f5223b6c162f1d971ea41b224c97363130242c /src/gallium/state_trackers/vega/paint.c
parent9b13e731fa33183b205b4bd84c69c70441867093 (diff)
vega: fix for object handle leak
frees the object handle when a OpenVG is destroyed. Signed-off-by: Andreas Pokorny <[email protected]> Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vega/paint.c')
-rw-r--r--src/gallium/state_trackers/vega/paint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vega/paint.c b/src/gallium/state_trackers/vega/paint.c
index f73e60c9e6d..79b7a277851 100644
--- a/src/gallium/state_trackers/vega/paint.c
+++ b/src/gallium/state_trackers/vega/paint.c
@@ -229,8 +229,10 @@ void paint_destroy(struct vg_paint *paint)
pipe_sampler_view_reference(&paint->gradient.sampler_view, NULL);
if (paint->pattern.sampler_view)
pipe_sampler_view_reference(&paint->pattern.sampler_view, NULL);
- if (ctx)
+ if (ctx) {
vg_context_remove_object(ctx, &paint->base);
+ vg_free_object(&paint->base);
+ }
free(paint->gradient.ramp_stopsi);
free(paint->gradient.ramp_stops);