aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tool_operate.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 6b2d89ffb..68cd11c56 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -2286,8 +2286,12 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
struct OperationConfig *operation = config->first;
CURLSH *share = curl_share_init();
if(!share) {
- /* Cleanup the libcurl source output */
- easysrc_cleanup();
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+ if(config->libcurl) {
+ /* Cleanup the libcurl source output */
+ easysrc_cleanup();
+ }
+#endif
return CURLE_OUT_OF_MEMORY;
}