# HG changeset patch # User reimar # Date 1165779339 0 # Node ID 546cf4a6377ad0b74b64a9406360b59e87421ad9 # Parent 6ed90ece4b9b88dcb51ec7011fd96259702b647a Make sure stream->fd is set correct (esp. to -1 on error when fd is closed) diff -r 6ed90ece4b9b -r 546cf4a6377a stream/http.c --- a/stream/http.c Sun Dec 10 19:25:59 2006 +0000 +++ b/stream/http.c Sun Dec 10 19:35:39 2006 +0000 @@ -744,7 +744,6 @@ goto err_out; } - stream->fd=fd; if( mp_msg_test(MSGT_NETWORK,MSGL_V) ) { http_debug_hdr( http_hdr ); } @@ -857,9 +856,11 @@ err_out: if (fd > 0) closesocket( fd ); + fd = -1; res = -1; http_free( http_hdr ); out: + stream->fd = fd; return res; }