MCPcopy Index your code
hub / github.com/git/git / http_cleanup

Function http_cleanup

http.c:1516–1573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1514}
1515
1516void http_cleanup(void)
1517{
1518 struct active_request_slot *slot = active_queue_head;
1519
1520 while (slot != NULL) {
1521 struct active_request_slot *next = slot->next;
1522 if (slot->curl) {
1523 xmulti_remove_handle(slot);
1524 curl_easy_cleanup(slot->curl);
1525 }
1526 free(slot);
1527 slot = next;
1528 }
1529 active_queue_head = NULL;
1530
1531 curl_easy_cleanup(curl_default);
1532
1533 curl_multi_cleanup(curlm);
1534 curl_global_cleanup();
1535
1536 string_list_clear(&extra_http_headers, 0);
1537
1538 curl_slist_free_all(pragma_header);
1539 pragma_header = NULL;
1540
1541 curl_slist_free_all(host_resolutions);
1542 host_resolutions = NULL;
1543
1544 if (curl_http_proxy) {
1545 free((void *)curl_http_proxy);
1546 curl_http_proxy = NULL;
1547 }
1548
1549 if (proxy_auth.password) {
1550 memset(proxy_auth.password, 0, strlen(proxy_auth.password));
1551 FREE_AND_NULL(proxy_auth.password);
1552 }
1553
1554 free((void *)curl_proxyuserpwd);
1555 curl_proxyuserpwd = NULL;
1556
1557 free((void *)http_proxy_authmethod);
1558 http_proxy_authmethod = NULL;
1559
1560 if (cert_auth.password) {
1561 memset(cert_auth.password, 0, strlen(cert_auth.password));
1562 FREE_AND_NULL(cert_auth.password);
1563 }
1564 ssl_cert_password_required = 0;
1565
1566 if (proxy_cert_auth.password) {
1567 memset(proxy_cert_auth.password, 0, strlen(proxy_cert_auth.password));
1568 FREE_AND_NULL(proxy_cert_auth.password);
1569 }
1570 proxy_ssl_cert_password_required = 0;
1571
1572 FREE_AND_NULL(cached_accept_language);
1573}

Callers 4

cmd_mainFunction · 0.85
cmd_mainFunction · 0.85
fetch_using_walkerFunction · 0.85
fetch_single_packfileFunction · 0.85

Calls 2

xmulti_remove_handleFunction · 0.85
string_list_clearFunction · 0.85

Tested by

no test coverage detected