From 37c506e8b94d2691539bc29ef861903503a99b82 Mon Sep 17 00:00:00 2001 From: Zhentan Feng Date: Sat, 28 Aug 2010 23:55:26 +0000 Subject: [PATCH] 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 . Originally committed as revision 24960 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/mmsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c index 5a74d9b7ae..4214b0e111 100644 --- a/libavformat/mmsh.c +++ b/libavformat/mmsh.c @@ -214,7 +214,7 @@ static int mmsh_open(URLContext *h, const char *uri, int flags) { int i, port, err; char httpname[256], path[256], host[128], location[1024]; - char *stream_selection; + char *stream_selection = NULL; char headers[1024]; MMSHContext *mmsh; MMSContext *mms;