diff libmpdemux/network.c @ 3732:837ed2f1ed5e

possible uninit pointer free()'d possible bad pointer
author pl
date Tue, 25 Dec 2001 16:35:57 +0000
parents bed6226ffb46
children 879a668ee540
line wrap: on
line diff
--- a/libmpdemux/network.c	Tue Dec 25 16:30:25 2001 +0000
+++ b/libmpdemux/network.c	Tue Dec 25 16:35:57 2001 +0000
@@ -451,10 +451,9 @@
 				fd = -1;
 		}
 		stream->fd = fd;
+		http_free( http_hdr );
 	}
 
-	http_free( http_hdr );
-
 	stream->streaming_ctrl->streaming_read = nop_streaming_read;
 	stream->streaming_ctrl->streaming_seek = nop_streaming_seek;
 	stream->streaming_ctrl->prebuffer_size = 180000;
@@ -543,7 +542,7 @@
 	streaming_ctrl_t *streaming_ctrl;
 	int fd;
 
-	if( streaming_ctrl==NULL ) return -1;
+	if( stream==NULL ) return -1;
 	streaming_ctrl = stream->streaming_ctrl;
 	fd = stream->fd;