diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-14 14:10:04 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-14 14:10:04 +0000 |
commit | d17ac2d7bf710daa338b3ccaec29a89f2d9a6e39 (patch) | |
tree | 9b2aef3e76dce387d80d8dbc863f79af99660030 /libmpdemux | |
parent | 5c51b1378541b894d0a1efeda54a29c25ae51e71 (diff) | |
download | mpv-d17ac2d7bf710daa338b3ccaec29a89f2d9a6e39.tar.bz2 mpv-d17ac2d7bf710daa338b3ccaec29a89f2d9a6e39.tar.xz |
missing free in case sdpplin_parse_stream returns invalid stream.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18096 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/realrtsp/sdpplin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libmpdemux/realrtsp/sdpplin.c b/libmpdemux/realrtsp/sdpplin.c index 98b2fe5222..56be87128b 100644 --- a/libmpdemux/realrtsp/sdpplin.c +++ b/libmpdemux/realrtsp/sdpplin.c @@ -238,7 +238,6 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) { sdpplin_t *sdpplin_parse(char *data) { sdpplin_t *desc=calloc(1,sizeof(sdpplin_t)); - sdpplin_stream_t *stream; char *buf=xbuffer_init(32); char *decoded=xbuffer_init(32); int handled; @@ -249,14 +248,17 @@ sdpplin_t *sdpplin_parse(char *data) { handled=0; if (filter(data, "m=", &buf)) { - stream=sdpplin_parse_stream(&data); + sdpplin_stream_t *stream=sdpplin_parse_stream(&data); #ifdef LOG printf("got data for stream id %u\n", stream->stream_id); #endif if (desc->stream && (stream->stream_id >= 0) && (stream->stream_id < desc->stream_count)) desc->stream[stream->stream_id]=stream; else + { mp_msg(MSGT_OPEN, MSGL_ERR, "sdpplin: got 'm=', but 'a=StreamCount' is still unknown. Broken sdp?\n"); + free(stream); + } continue; } |