[Mplayer-cvslog] CVS: main/libmpdemux http.c,1.15,1.16

Bertrand Baudet bertrand at mplayerhq.hu
Sat Sep 7 10:16:16 CEST 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv21952/libmpdemux

Modified Files:
	http.c 
Log Message:
Check if realloc failed on http_hdr->buffer instead of ptr in http_response_append,
and got rid of ptr which wasn't used anymore.


Index: http.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/http.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- http.c	6 Sep 2002 00:03:16 -0000	1.15
+++ http.c	7 Sep 2002 08:15:57 -0000	1.16
@@ -45,10 +45,10 @@
 
 int
 http_response_append( HTTP_header_t *http_hdr, char *response, int length ) {
-	char *ptr;
 	if( http_hdr==NULL || response==NULL || length<0 ) return -1;
+
 	http_hdr->buffer = (char*)realloc( http_hdr->buffer, http_hdr->buffer_size+length+1 );
-	if( ptr==NULL ) {
+	if( http_hdr->buffer==NULL ) {
 		mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory (re)allocation failed\n");
 		return -1;
 	}




More information about the MPlayer-cvslog mailing list