# HG changeset patch # User reimar # Date 1145023804 0 # Node ID 5327871ea0e5cb7952b3eedfc15af8d39e80228a # Parent 16f2bcd5d1484f0e8a2f389cca4b9174e11a67f7 missing free in case sdpplin_parse_stream returns invalid stream. diff -r 16f2bcd5d148 -r 5327871ea0e5 libmpdemux/realrtsp/sdpplin.c --- a/libmpdemux/realrtsp/sdpplin.c Fri Apr 14 13:37:38 2006 +0000 +++ b/libmpdemux/realrtsp/sdpplin.c Fri Apr 14 14:10:04 2006 +0000 @@ -238,7 +238,6 @@ 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 @@ 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; }