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
This commit is contained in:
parent
fd92f8d6a2
commit
4e7edb2778
@ -143,9 +143,10 @@ gst_geometric_transform_generate_map (GstGeometricTransform * gt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
if (!ret)
|
if (!ret) {
|
||||||
g_free (gt->map);
|
g_free (gt->map);
|
||||||
else
|
gt->map = NULL;
|
||||||
|
} else
|
||||||
gt->needs_remap = FALSE;
|
gt->needs_remap = FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -348,6 +349,7 @@ gst_geometric_transform_stop (GstBaseTransform * trans)
|
|||||||
GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM_CAST (trans);
|
GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM_CAST (trans);
|
||||||
|
|
||||||
g_free (gt->map);
|
g_free (gt->map);
|
||||||
|
gt->map = NULL;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user