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
@ -27,14 +27,14 @@ static void gpg_interface_lazy_init(void)
|
||||
}
|
||||
|
||||
static char *configured_signing_key;
|
||||
static const char *ssh_default_key_command;
|
||||
static char *ssh_default_key_command;
|
||||
static char *ssh_allowed_signers;
|
||||
static char *ssh_revocation_file;
|
||||
static enum signature_trust_level configured_min_trust_level = TRUST_UNDEFINED;
|
||||
|
||||
struct gpg_format {
|
||||
const char *name;
|
||||
const char *program;
|
||||
char *program;
|
||||
const char **verify_args;
|
||||
const char **sigs;
|
||||
int (*verify_signed_buffer)(struct signature_check *sigc,
|
||||
|
Reference in New Issue
Block a user