OSDN Git Service
(root)
/
git-core
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'jt/subprocess-handshake' into maint
[git-core/git.git]
/
http.c
diff --git
a/http.c
b/http.c
index
d2e11ec
..
76ff63c
100644
(file)
--- a/
http.c
+++ b/
http.c
@@
-1,5
+1,6
@@
#include "git-compat-util.h"
#include "http.h"
#include "git-compat-util.h"
#include "http.h"
+#include "config.h"
#include "pack.h"
#include "sideband.h"
#include "run-command.h"
#include "pack.h"
#include "sideband.h"
#include "run-command.h"
@@
-271,10
+272,10
@@
static int http_options(const char *var, const char *value, void *cb)
if (!strcmp("http.sslversion", var))
return git_config_string(&ssl_version, var, value);
if (!strcmp("http.sslcert", var))
if (!strcmp("http.sslversion", var))
return git_config_string(&ssl_version, var, value);
if (!strcmp("http.sslcert", var))
- return git_config_
string
(&ssl_cert, var, value);
+ return git_config_
pathname
(&ssl_cert, var, value);
#if LIBCURL_VERSION_NUM >= 0x070903
if (!strcmp("http.sslkey", var))
#if LIBCURL_VERSION_NUM >= 0x070903
if (!strcmp("http.sslkey", var))
- return git_config_
string
(&ssl_key, var, value);
+ return git_config_
pathname
(&ssl_key, var, value);
#endif
#if LIBCURL_VERSION_NUM >= 0x070908
if (!strcmp("http.sslcapath", var))
#endif
#if LIBCURL_VERSION_NUM >= 0x070908
if (!strcmp("http.sslcapath", var))
@@
-1026,8
+1027,7
@@
void http_cleanup(void)
if (proxy_auth.password) {
memset(proxy_auth.password, 0, strlen(proxy_auth.password));
if (proxy_auth.password) {
memset(proxy_auth.password, 0, strlen(proxy_auth.password));
- free(proxy_auth.password);
- proxy_auth.password = NULL;
+ FREE_AND_NULL(proxy_auth.password);
}
free((void *)curl_proxyuserpwd);
}
free((void *)curl_proxyuserpwd);
@@
-1038,13
+1038,11
@@
void http_cleanup(void)
if (cert_auth.password != NULL) {
memset(cert_auth.password, 0, strlen(cert_auth.password));
if (cert_auth.password != NULL) {
memset(cert_auth.password, 0, strlen(cert_auth.password));
- free(cert_auth.password);
- cert_auth.password = NULL;
+ FREE_AND_NULL(cert_auth.password);
}
ssl_cert_password_required = 0;
}
ssl_cert_password_required = 0;
- free(cached_accept_language);
- cached_accept_language = NULL;
+ FREE_AND_NULL(cached_accept_language);
}
struct active_request_slot *get_active_slot(void)
}
struct active_request_slot *get_active_slot(void)
@@
-1896,8
+1894,7
@@
static char *fetch_pack_index(unsigned char *sha1, const char *base_url)
if (http_get_file(url, tmp, NULL) != HTTP_OK) {
error("Unable to get pack index %s", url);
if (http_get_file(url, tmp, NULL) != HTTP_OK) {
error("Unable to get pack index %s", url);
- free(tmp);
- tmp = NULL;
+ FREE_AND_NULL(tmp);
}
free(url);
}
free(url);
@@
-2328,8
+2325,7
@@
void release_http_object_request(struct http_object_request *freq)
freq->localfile = -1;
}
if (freq->url != NULL) {
freq->localfile = -1;
}
if (freq->url != NULL) {
- free(freq->url);
- freq->url = NULL;
+ FREE_AND_NULL(freq->url);
}
if (freq->slot != NULL) {
freq->slot->callback_func = NULL;
}
if (freq->slot != NULL) {
freq->slot->callback_func = NULL;