summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-26 23:18:29 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-26 23:18:29 -0500
commit1f241c6c969f6245eadcdc4064f4ba92d7107b0d (patch)
tree16a40ecd039dba4dc7ab1f7602d1c5b5550d0e4e
parent667de5e4155dcfad6cb6fecf378a305aaf8e3393 (diff)
downloadhorizon-1f241c6c969f6245eadcdc4064f4ba92d7107b0d.tar.gz
horizon-1f241c6c969f6245eadcdc4064f4ba92d7107b0d.tar.bz2
horizon-1f241c6c969f6245eadcdc4064f4ba92d7107b0d.tar.xz
horizon-1f241c6c969f6245eadcdc4064f4ba92d7107b0d.zip
hscript: Close file after download
-rw-r--r--hscript/util.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/hscript/util.cc b/hscript/util.cc
index 8317995..7a0f186 100644
--- a/hscript/util.cc
+++ b/hscript/util.cc
@@ -57,6 +57,8 @@ bool download_file(const std::string &url, const std::string &path) {
} else {
output_error("curl", "couldn't download file", errbuf);
}
+
+ fclose(fp);
curl_easy_cleanup(curl);
return return_code;
}