summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2015-09-21 02:21:38 -0400
committerJay Satiro <raysatiro@yahoo.com>2015-09-21 02:21:38 -0400
commit3f8d4e264d96243e8e963c39713efd542adc90cf (patch)
tree9ff6613196c0bd6e5449f2afc6ddf4884dc56204
parentbb72b9453d23c9aea4e5778ea367b97dd702864d (diff)
downloadgnurl-3f8d4e264d96243e8e963c39713efd542adc90cf.tar.gz
gnurl-3f8d4e264d96243e8e963c39713efd542adc90cf.tar.bz2
gnurl-3f8d4e264d96243e8e963c39713efd542adc90cf.zip
tool_operate: Don't call easysrc cleanup unless --libcurl
- Review of 4d95491. The author changed it so easysrc only initializes when --libcurl but did not do the same for the call to easysrc cleanup. Ref: https://github.com/bagder/curl/issues/429
-rw-r--r--src/tool_operate.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 4e0f02807..41a71dd73 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1863,9 +1863,10 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
}
else {
#ifndef CURL_DISABLE_LIBCURL_OPTION
- /* Initialise the libcurl source output */
- if(config->libcurl)
+ if(config->libcurl) {
+ /* Initialise the libcurl source output */
result = easysrc_init();
+ }
#endif
/* Perform the main operations */
@@ -1891,11 +1892,13 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
}
#ifndef CURL_DISABLE_LIBCURL_OPTION
- /* Cleanup the libcurl source output */
- easysrc_cleanup();
+ if(config->libcurl) {
+ /* Cleanup the libcurl source output */
+ easysrc_cleanup();
- /* Dump the libcurl code if previously enabled */
- dumpeasysrc(config);
+ /* Dump the libcurl code if previously enabled */
+ dumpeasysrc(config);
+ }
#endif
}
else