The opt_ff variable is supposed to have an allocated string (strdup), we can't just overwrite it with a const char *. Functionally it doesn't matter, since after this point opt_ff is never freed, only accessed, but still... It's better to be consistent. Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx> --- builtin/pull.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/pull.c b/builtin/pull.c index addb454e63..118fbdeb62 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -1056,7 +1056,8 @@ int cmd_pull(int argc, const char **argv, const char *prefix) if (can_ff) { /* we can fast-forward this without invoking rebase */ - opt_ff = "--ff-only"; + free(opt_ff); + opt_ff = xstrdup_or_null("--ff-only"); ret = run_merge(); } else { ret = run_rebase(&newbase, &upstream); -- 2.29.2