mirror of https://github.com/mpv-player/mpv
Close fd on error.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21551 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d24e49b53d
commit
5adaad47de
|
@ -178,7 +178,7 @@ http_send_request( URL_t *url, off_t pos ) {
|
|||
HTTP_header_t *http_hdr;
|
||||
URL_t *server_url;
|
||||
char str[256];
|
||||
int fd;
|
||||
int fd = -1;
|
||||
int ret;
|
||||
int proxy = 0; // Boolean
|
||||
|
||||
|
@ -245,6 +245,7 @@ http_send_request( URL_t *url, off_t pos ) {
|
|||
|
||||
return fd;
|
||||
err_out:
|
||||
if (fd > 0) closesocket(fd);
|
||||
http_free(http_hdr);
|
||||
if (proxy && server_url)
|
||||
url_free(server_url);
|
||||
|
|
Loading…
Reference in New Issue