Commit 345e216
builtin/merge.c: use fixed strings, not "strbuf", fix leak
Follow-up 465028e (merge: add missing strbuf_release(),
2021-10-07) and address the "msg" memory leak in this block. We could
free "&msg" before the "goto done" here, but even better is to avoid
allocating it in the first place.
By repeating the "Fast-forward" string here we can avoid using a
"struct strbuf" altogether.
Suggested-by: René Scharfe <[email protected]>
Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 8155961 commit 345e216
2 files changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1560 | 1560 | | |
1561 | 1561 | | |
1562 | 1562 | | |
1563 | | - | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1564 | 1566 | | |
1565 | 1567 | | |
1566 | 1568 | | |
| |||
1570 | 1572 | | |
1571 | 1573 | | |
1572 | 1574 | | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
1577 | 1575 | | |
1578 | 1576 | | |
1579 | 1577 | | |
| |||
1592 | 1590 | | |
1593 | 1591 | | |
1594 | 1592 | | |
1595 | | - | |
| 1593 | + | |
1596 | 1594 | | |
1597 | | - | |
1598 | 1595 | | |
1599 | 1596 | | |
1600 | 1597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
0 commit comments