mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 02:32:23 +00:00
mpegdemux: avoid some unlikely leaks
This commit is contained in:
parent
c63be1402a
commit
552f991ba0
2 changed files with 13 additions and 3 deletions
|
@ -399,8 +399,13 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name == NULL || template == NULL || caps == NULL)
|
if (name == NULL || template == NULL || caps == NULL) {
|
||||||
return NULL;
|
if (name)
|
||||||
|
g_free (name);
|
||||||
|
if (caps)
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
stream = g_new0 (GstFluPSStream, 1);
|
stream = g_new0 (GstFluPSStream, 1);
|
||||||
stream->id = id;
|
stream->id = id;
|
||||||
|
|
|
@ -829,8 +829,13 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id,
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (name == NULL || template == NULL || caps == NULL)
|
if (name == NULL || template == NULL || caps == NULL) {
|
||||||
|
if (name)
|
||||||
|
g_free (name);
|
||||||
|
if (caps)
|
||||||
|
gst_caps_unref (caps);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
stream->stream_type = stream_type;
|
stream->stream_type = stream_type;
|
||||||
stream->id = id;
|
stream->id = id;
|
||||||
|
|
Loading…
Reference in a new issue