From b328fbe31a4eabf0b399efabfa205ce777cc2676 Mon Sep 17 00:00:00 2001 From: Vineeth T M Date: Mon, 23 Nov 2015 11:32:13 +0900 Subject: [PATCH] spu-pgs: Fix array memory leak https://bugzilla.gnome.org/show_bug.cgi?id=758517 --- gst/dvdspu/gstspu-pgs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c index 009c3e09bf..6108de07c2 100644 --- a/gst/dvdspu/gstspu-pgs.c +++ b/gst/dvdspu/gstspu-pgs.c @@ -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);