summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-12-31 11:40:28 +0100
committerSteve Holme <steve_holme@hotmail.com>2014-12-31 11:14:22 +0000
commit8a3c0fbed1dc0a09f1d53579a0112b546cd3d76d (patch)
tree6fe0476b57b376f76b567864f16154e2d75b1ce4
parente9d0c7a6f366f3e4ef56c408a991700f600f20cf (diff)
downloadgnurl-8a3c0fbed1dc0a09f1d53579a0112b546cd3d76d.tar.gz
gnurl-8a3c0fbed1dc0a09f1d53579a0112b546cd3d76d.tar.bz2
gnurl-8a3c0fbed1dc0a09f1d53579a0112b546cd3d76d.zip
sepheaders.c: Fixed resource leak on failure
-rw-r--r--docs/examples/sepheaders.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c
index 63ea99391..e085f5177 100644
--- a/docs/examples/sepheaders.c
+++ b/docs/examples/sepheaders.c
@@ -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
* you should have received as part of this distribution. The terms
@@ -62,6 +62,7 @@ int main(void)
bodyfile = fopen(bodyfilename,"wb");
if (bodyfile == NULL) {
curl_easy_cleanup(curl_handle);
+ fclose(headerfile);
return -1;
}