From: Julien Nabet Date: Wed, 31 Dec 2014 10:40:28 +0000 (+0100) Subject: sepheaders.c: Fixed resource leak on failure X-Git-Tag: curl-7_40_0~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a3c0fbed1dc0a09f1d53579a0112b546cd3d76d;p=curl sepheaders.c: Fixed resource leak on failure --- 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, , et al. + * Copyright (C) 1998 - 2014, Daniel Stenberg, , 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; }