summaryrefslogtreecommitdiffstats
path: root/merge-ll.c
diff options
context:
space:
mode:
Diffstat (limited to 'merge-ll.c')
-rw-r--r--merge-ll.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/merge-ll.c b/merge-ll.c
index e29b15fa4a..180c19df67 100644
--- a/merge-ll.c
+++ b/merge-ll.c
@@ -27,7 +27,7 @@ typedef enum ll_merge_result (*ll_merge_fn)(const struct ll_merge_driver *,
struct ll_merge_driver {
const char *name;
- char *description;
+ const char *description;
ll_merge_fn fn;
char *recursive;
struct ll_merge_driver *next;
@@ -304,8 +304,13 @@ static int read_merge_config(const char *var, const char *value,
ll_user_merge_tail = &(fn->next);
}
- if (!strcmp("name", key))
- return git_config_string(&fn->description, var, value);
+ if (!strcmp("name", key)) {
+ /*
+ * The description is leaking, but that's okay as we want to
+ * keep around the merge drivers anyway.
+ */
+ return git_config_string((char **) &fn->description, var, value);
+ }
if (!strcmp("driver", key)) {
if (!value)