spu-pgs: Fix array memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=758517
This commit is contained in:
Vineeth T M 2015-11-23 11:32:13 +09:00 committed by Tim-Philipp Müller
parent 01f23d88f3
commit b328fbe31a

View file

@ -318,6 +318,8 @@ pgs_presentation_segment_set_object_count (PgsPresentationSegment * ps,
guint8 n_objects)
{
if (ps->objects == NULL) {
if (n_objects == 0)
return;
ps->objects =
g_array_sized_new (FALSE, TRUE, sizeof (PgsCompositionObject),
n_objects);