mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +00:00
wavparse: Fix memory leak in wavparse element
Fixing of leaking the text field of the GstWavParseNote and GstWavParseLabl structure. https://bugzilla.gnome.org/show_bug.cgi?id=785429
This commit is contained in:
parent
f2372b46bc
commit
059420b678
1 changed files with 20 additions and 1 deletions
|
@ -193,6 +193,22 @@ gst_wavparse_class_init (GstWavParseClass * klass)
|
||||||
"Erik Walthinsen <omega@cse.ogi.edu>");
|
"Erik Walthinsen <omega@cse.ogi.edu>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_wavparse_notes_free (GstWavParseNote * note)
|
||||||
|
{
|
||||||
|
if (note)
|
||||||
|
g_free (note->text);
|
||||||
|
g_free (note);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_wavparse_labls_free (GstWavParseLabl * labl)
|
||||||
|
{
|
||||||
|
if (labl)
|
||||||
|
g_free (labl->text);
|
||||||
|
g_free (labl);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_wavparse_reset (GstWavParse * wav)
|
gst_wavparse_reset (GstWavParse * wav)
|
||||||
{
|
{
|
||||||
|
@ -233,8 +249,11 @@ gst_wavparse_reset (GstWavParse * wav)
|
||||||
g_list_free_full (wav->cues, g_free);
|
g_list_free_full (wav->cues, g_free);
|
||||||
wav->cues = NULL;
|
wav->cues = NULL;
|
||||||
if (wav->labls)
|
if (wav->labls)
|
||||||
g_list_free_full (wav->labls, g_free);
|
g_list_free_full (wav->labls, (GDestroyNotify) gst_wavparse_labls_free);
|
||||||
wav->labls = NULL;
|
wav->labls = NULL;
|
||||||
|
if (wav->notes)
|
||||||
|
g_list_free_full (wav->notes, (GDestroyNotify) gst_wavparse_notes_free);
|
||||||
|
wav->notes = NULL;
|
||||||
if (wav->caps)
|
if (wav->caps)
|
||||||
gst_caps_unref (wav->caps);
|
gst_caps_unref (wav->caps);
|
||||||
wav->caps = NULL;
|
wav->caps = NULL;
|
||||||
|
|
Loading…
Reference in a new issue