mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 06:25:03 -05:00
sepheaders.c: Fixed resource leak on failure
This commit is contained in:
parent
e9d0c7a6f3
commit
8a3c0fbed1
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -62,6 +62,7 @@ int main(void)
|
|||||||
bodyfile = fopen(bodyfilename,"wb");
|
bodyfile = fopen(bodyfilename,"wb");
|
||||||
if (bodyfile == NULL) {
|
if (bodyfile == NULL) {
|
||||||
curl_easy_cleanup(curl_handle);
|
curl_easy_cleanup(curl_handle);
|
||||||
|
fclose(headerfile);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user