aboutsummaryrefslogtreecommitdiffstats
path: root/imap-send.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-05-27 13:46:39 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-27 11:20:00 -0700
commit1b261c20ed28ad26ddbcd3dff94a248ac6866ac8 (patch)
tree2b035eeafac8bc875b83bc643a0bff20aedd53c3 /imap-send.c
parent83024d98f78684fce3d4d0598e6b2b147a4b2ffa (diff)
downloadgit-1b261c20ed28ad26ddbcd3dff94a248ac6866ac8.tar.gz
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>
Diffstat (limited to 'imap-send.c')
-rw-r--r--imap-send.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/imap-send.c b/imap-send.c
index c0130d0e02..a5d1510180 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -70,16 +70,16 @@ static char *next_arg(char **);
struct imap_server_conf {
const char *name;
- const char *tunnel;
- const char *host;
+ char *tunnel;
+ char *host;
int port;
- const char *folder;
- const char *user;
- const char *pass;
+ char *folder;
+ char *user;
+ char *pass;
int use_ssl;
int ssl_verify;
int use_html;
- const char *auth_method;
+ char *auth_method;
};
static struct imap_server_conf server = {