Commit df22949a by Carlos Martín Nieto

config_set: really replace the value on overwrite

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
parent 8ecc5ae5
...@@ -163,8 +163,8 @@ static int config_set(git_config *cfg, const char *name, const char *value) ...@@ -163,8 +163,8 @@ static int config_set(git_config *cfg, const char *name, const char *value)
if (tmp == NULL) if (tmp == NULL)
return GIT_ENOMEM; return GIT_ENOMEM;
free(var->value); free(existing->value);
var->value = tmp; existing->value = tmp;
return GIT_SUCCESS; return GIT_SUCCESS;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment