mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
xfree is not particularly helpful, remove it. From Thomas Adam.
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "tmux.h"
|
||||
@ -152,12 +153,12 @@ window_choose_free(struct window_pane *wp)
|
||||
item = &ARRAY_ITEM(&data->list, i);
|
||||
if (data->freefn != NULL && item->wcd != NULL)
|
||||
data->freefn(item->wcd);
|
||||
xfree(item->name);
|
||||
free(item->name);
|
||||
}
|
||||
ARRAY_FREE(&data->list);
|
||||
|
||||
screen_free(&data->screen);
|
||||
xfree(data);
|
||||
free(data);
|
||||
}
|
||||
|
||||
void
|
||||
@ -493,7 +494,7 @@ window_choose_ctx(struct window_choose_data *cdata)
|
||||
if (cause != NULL) {
|
||||
*cause = toupper((u_char) *cause);
|
||||
status_message_set(cdata->client, "%s", cause);
|
||||
xfree(cause);
|
||||
free(cause);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -544,7 +545,7 @@ window_choose_add_window(struct window_pane *wp, struct cmd_ctx *ctx,
|
||||
|
||||
xasprintf(&action_data, "%s:%d", s->name, wl->idx);
|
||||
wcd->command = cmd_template_replace(action, action_data, 1);
|
||||
xfree(action_data);
|
||||
free(action_data);
|
||||
|
||||
wcd->idx = wl->idx;
|
||||
wcd->ft_template = xstrdup(template);
|
||||
|
Reference in New Issue
Block a user