Skip to content
Snippets Groups Projects
Commit 247b291b authored by Kamil Dudka's avatar Kamil Dudka
Browse files

examples/multi-single.c: fix the order of destructions

... so that it adheres to the API documentation.

Reported by: Tomas Mlcoch
parent e7c56a84
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,8 @@ int main(void)
int still_running; /* keep number of running handles */
curl_global_init(CURL_GLOBAL_DEFAULT);
http_handle = curl_easy_init();
/* set the options (I left out a few, you'll get the point anyway) */
......@@ -108,9 +110,13 @@ int main(void)
}
} while(still_running);
curl_multi_cleanup(multi_handle);
curl_multi_remove_handle(multi_handle, http_handle);
curl_easy_cleanup(http_handle);
curl_multi_cleanup(multi_handle);
curl_global_cleanup();
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment