Message ID | 5be3e4fb47f534e7b1467c1d844996bcd1121ca0.1548186510.git.martin.agren@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | setup: fix memory leaks with `struct repository_format` | expand |
diff --git a/setup.c b/setup.c index 1be5037f12..bb633942bb 100644 --- a/setup.c +++ b/setup.c @@ -411,6 +411,7 @@ static int read_worktree_config(const char *var, const char *value, void *vdata) } else if (strcmp(var, "core.worktree") == 0) { if (!value) return config_error_nonbool(var); + free(data->work_tree); data->work_tree = xstrdup(value); } return 0;