Signed-off-by: Johan Herland <johan@xxxxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html