summaryrefslogtreecommitdiff
path: root/gst/geometrictransform
diff options
context:
space:
mode:
authorOleksij Rempel (Alexey Fisher) <bug-track@fisher-privat.net>2012-03-12 15:42:04 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2012-03-12 23:56:50 +0000
commit4e7edb2778f85a5475ffe9c782c91d86a7b902ca (patch)
treedaba63aa622591470ac61d0e5fb4be8c7fbb7868 /gst/geometrictransform
parentfd92f8d6a29595274abc425f574430ecc891894e (diff)
downloadgstreamer-plugins-bad-4e7edb2778f85a5475ffe9c782c91d86a7b902ca.tar.gz
geometrictransform: make sure gt->map not freed twice
current cheese can create situation where gt->map is freed twice. This patch set map to null to avoid it. https://bugzilla.gnome.org/show_bug.cgi?id=671910
Diffstat (limited to 'gst/geometrictransform')
-rw-r--r--gst/geometrictransform/gstgeometrictransform.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/geometrictransform/gstgeometrictransform.c b/gst/geometrictransform/gstgeometrictransform.c
index 8e78de7ab..274d483f2 100644
--- a/gst/geometrictransform/gstgeometrictransform.c
+++ b/gst/geometrictransform/gstgeometrictransform.c
@@ -143,9 +143,10 @@ gst_geometric_transform_generate_map (GstGeometricTransform * gt)
}
end:
- if (!ret)
+ if (!ret) {
g_free (gt->map);
- else
+ gt->map = NULL;
+ } else
gt->needs_remap = FALSE;
return ret;
}
@@ -348,6 +349,7 @@ gst_geometric_transform_stop (GstBaseTransform * trans)
GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM_CAST (trans);
g_free (gt->map);
+ gt->map = NULL;
return TRUE;
}