summaryrefslogtreecommitdiff
path: root/gst/mpegdemux
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2012-01-23 14:01:02 +0100
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2012-01-23 14:22:17 +0100
commit552f991ba0710c5cb76c8b8f72cd0c757c52c895 (patch)
tree6f921f541c0199c756971437cd5ac93eb73ee286 /gst/mpegdemux
parentc63be1402a532c9e7c7c7aa9b83a1716793d2dd1 (diff)
downloadgstreamer-plugins-bad-552f991ba0710c5cb76c8b8f72cd0c757c52c895.tar.gz
mpegdemux: avoid some unlikely leaks
Diffstat (limited to 'gst/mpegdemux')
-rw-r--r--gst/mpegdemux/gstmpegdemux.c9
-rw-r--r--gst/mpegdemux/gstmpegtsdemux.c7
2 files changed, 13 insertions, 3 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index 7d5b13905..d1f58d079 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -399,8 +399,13 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type)
break;
}
- if (name == NULL || template == NULL || caps == NULL)
- return NULL;
+ if (name == NULL || template == NULL || caps == NULL) {
+ if (name)
+ g_free (name);
+ if (caps)
+ gst_caps_unref (caps);
+ return FALSE;
+ }
stream = g_new0 (GstFluPSStream, 1);
stream->id = id;
diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c
index 5ee8daeb1..7d75bbeb0 100644
--- a/gst/mpegdemux/gstmpegtsdemux.c
+++ b/gst/mpegdemux/gstmpegtsdemux.c
@@ -829,8 +829,13 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id,
default:
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;
+ }
stream->stream_type = stream_type;
stream->id = id;