blame: drop strdup of string literal

This strdup was added as part of 58dbfa2 (blame: accept multiple -L ranges, 2013-08-06) to be consistent with parse_opt_string_list(), which appends to the same list. But as of 7a7a517 (parse_opt_string_list: stop allocating new strings, 2016-06-13), we should stop using strdup (to match parse_opt_string_list, and for all the reasons described in that commit; namely that it does nothing useful and causes us to leak the memory). Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Sunshine committed Aug 2, 2016 at 06:52 UTC aa59e14b23b3c075e7f50eae73d9c6812ed96959
1 file changed +1 -1
builtin/blame.c
+1 -1
@@ -2748,7 +2748,7 @@ parse_done:
2748 lno = prepare_lines(&sb);
2749
2750 if (lno && !range_list.nr)
2751 - string_list_append(&range_list, xstrdup("1"));
2751 + string_list_append(&range_list, "1");
2752
2753 anchor = 1;
2754 range_set_init(&ranges, range_list.nr);