mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
grid: reflow: URI range start: take over ownership of URI string
Instead of strdup:ing the URI, take over ownership. This is ok since the old URI range will be free:d anyway.
This commit is contained in:
parent
8a9643de67
commit
a003e56fdc
1 changed files with 2 additions and 1 deletions
3
grid.c
3
grid.c
|
|
@ -300,8 +300,9 @@ reflow_uri_range_start(struct row_uri_range *range, struct row *new_row,
|
||||||
.start = new_col_idx,
|
.start = new_col_idx,
|
||||||
.end = -1,
|
.end = -1,
|
||||||
.id = range->id,
|
.id = range->id,
|
||||||
.uri = xstrdup(range->uri),
|
.uri = range->uri,
|
||||||
};
|
};
|
||||||
|
range->uri = NULL;
|
||||||
grid_row_add_uri_range(new_row, new_range);
|
grid_row_add_uri_range(new_row, new_range);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue