config: clarify memory ownership in git_config_string()
The out parameter of `git_config_string()` is a `const char **` even though we transfer ownership of memory to the caller. This is quite misleading and has led to many memory leaks all over the place. Adapt the parameter to instead be `char **`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
83024d98f7
commit
1b261c20ed
@ -88,7 +88,7 @@ static struct strbuf push_cert = STRBUF_INIT;
|
||||
static struct object_id push_cert_oid;
|
||||
static struct signature_check sigcheck;
|
||||
static const char *push_cert_nonce;
|
||||
static const char *cert_nonce_seed;
|
||||
static char *cert_nonce_seed;
|
||||
static struct strvec hidden_refs = STRVEC_INIT;
|
||||
|
||||
static const char *NONCE_UNSOLICITED = "UNSOLICITED";
|
||||
|
||||
Reference in New Issue
Block a user