stream_selection can be freed in the fail case, in which case it's unassigned.

Therefore, init it with NULL to prevent a crash on invalid streams.

Patch by Zhentan Feng <spyfeng gmail com>.

Originally committed as revision 24960 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Zhentan Feng 2010-08-28 23:55:26 +00:00 committed by Ronald S. Bultje
parent 774b20ca72
commit 37c506e8b9
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
{ {
int i, port, err; int i, port, err;
char httpname[256], path[256], host[128], location[1024]; char httpname[256], path[256], host[128], location[1024];
char *stream_selection; char *stream_selection = NULL;
char headers[1024]; char headers[1024];
MMSHContext *mmsh; MMSHContext *mmsh;
MMSContext *mms; MMSContext *mms;