Commit 3f8d4e26 authored by Jay Satiro's avatar Jay Satiro
Browse files

tool_operate: Don't call easysrc cleanup unless --libcurl

- Review of 4d954916.

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
parent bb72b945
Loading
Loading
Loading
Loading
+9 −6
Original line number Original line Diff line number Diff line
@@ -1863,9 +1863,10 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
    }
    }
    else {
    else {
#ifndef CURL_DISABLE_LIBCURL_OPTION
#ifndef CURL_DISABLE_LIBCURL_OPTION
      if(config->libcurl) {
        /* Initialise the libcurl source output */
        /* Initialise the libcurl source output */
      if(config->libcurl)
        result = easysrc_init();
        result = easysrc_init();
      }
#endif
#endif


      /* Perform the main operations */
      /* Perform the main operations */
@@ -1891,11 +1892,13 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
        }
        }


#ifndef CURL_DISABLE_LIBCURL_OPTION
#ifndef CURL_DISABLE_LIBCURL_OPTION
        if(config->libcurl) {
          /* Cleanup the libcurl source output */
          /* Cleanup the libcurl source output */
          easysrc_cleanup();
          easysrc_cleanup();


          /* Dump the libcurl code if previously enabled */
          /* Dump the libcurl code if previously enabled */
          dumpeasysrc(config);
          dumpeasysrc(config);
        }
#endif
#endif
      }
      }
      else
      else