mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 14:16:18 +00:00
Free working stuff when R formats fail.
This commit is contained in:
6
format.c
6
format.c
@@ -5261,8 +5261,12 @@ format_replace(struct format_expand_state *es, const char *key, size_t keylen,
|
|||||||
else {
|
else {
|
||||||
value = xstrdup("");
|
value = xstrdup("");
|
||||||
for (i = 0; i < nrep; i++) {
|
for (i = 0; i < nrep; i++) {
|
||||||
if (!format_check_time(es))
|
if (!format_check_time(es)) {
|
||||||
|
free(right);
|
||||||
|
free(left);
|
||||||
|
free(value);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
xasprintf(&new, "%s%s", value, left);
|
xasprintf(&new, "%s%s", value, left);
|
||||||
free(value);
|
free(value);
|
||||||
value = new;
|
value = new;
|
||||||
|
|||||||
Reference in New Issue
Block a user