From: Johan Herland Date: Tue, 11 Aug 2009 10:10:21 GMT Subject: [RFC/PATCH 1/6] Minor unrelated fixes Message-ID: <1249985426-13726-2-git-send-email-johan@herland.net> In-Reply-To: Signed-off-by: Johan Herland --- help.c | 2 +- transport-helper.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/help.c b/help.c index 6c46d8b..994561d 100644 --- a/help.c +++ b/help.c @@ -302,7 +302,7 @@ const char *help_unknown_cmd(const char *cmd) struct cmdnames main_cmds, other_cmds; memset(&main_cmds, 0, sizeof(main_cmds)); - memset(&other_cmds, 0, sizeof(main_cmds)); + memset(&other_cmds, 0, sizeof(other_cmds)); memset(&aliases, 0, sizeof(aliases)); git_config(git_unknown_cmd_config, NULL); diff --git a/transport-helper.c b/transport-helper.c index cc99368..a901630 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -8,7 +8,7 @@ struct helper_data { - const char *name; + char *name; struct child_process *helper; char *marks_filename; @@ -258,8 +258,10 @@ int transport_helper_init(struct transport *transport) transport->url = transport->remote->foreign_vcs; } else { char *eom = strchr(transport->url, ':'); - if (!eom) + if (!eom) { + free(data); return -1; + } data->name = xstrndup(transport->url, eom - transport->url); } -- 1.6.4.rc3.138.ga6b98.dirty