kateenc: Fix memory leak in error cases

CID #1427096
CID #1427114
This commit is contained in:
Edward Hervey 2018-01-03 12:15:01 +01:00 committed by Edward Hervey
parent 1da40cdc0f
commit 203d5867ea

View file

@ -810,6 +810,10 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf)
}
}
#endif
g_free (kregion);
g_free (kbitmap);
g_free (kpalette);
} else if (G_UNLIKELY (kbitmap->width == 0 || kbitmap->height == 0)) {
/* there are some DVDs (well, at least one) where some dimwits put in a wholly transparent full screen 720x576 SPU !!!!?! */
GST_WARNING_OBJECT (ke, "SPU is totally invisible - dimwits");