Commit 71e01a0
builtin/merge: always store allocated strings in
The `pull_twohead` configuration may sometimes contain an allocated
string, and sometimes it may contain a string constant. Refactor this to
instead always store an allocated string such that we can release its
resources without risk.
While at it, manage the lifetime of other config strings, as well. Note
that we explicitly don't free `cleanup_arg` here. This is because the
variable may be assigned a string constant via command line options.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>pull_twohead
1 parent fc06676 commit 71e01a0
1 file changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
614 | | - | |
| 614 | + | |
615 | 615 | | |
616 | | - | |
| 616 | + | |
617 | 617 | | |
618 | | - | |
| 618 | + | |
| 619 | + | |
619 | 620 | | |
620 | | - | |
| 621 | + | |
| 622 | + | |
621 | 623 | | |
622 | | - | |
| 624 | + | |
623 | 625 | | |
624 | | - | |
| 626 | + | |
625 | 627 | | |
626 | 628 | | |
627 | 629 | | |
| |||
1294 | 1296 | | |
1295 | 1297 | | |
1296 | 1298 | | |
1297 | | - | |
| 1299 | + | |
1298 | 1300 | | |
1299 | 1301 | | |
1300 | 1302 | | |
| |||
1793 | 1795 | | |
1794 | 1796 | | |
1795 | 1797 | | |
| 1798 | + | |
| 1799 | + | |
1796 | 1800 | | |
1797 | 1801 | | |
1798 | 1802 | | |
0 commit comments