mirror of https://github.com/tmux/tmux.git
calloc cb data so the client is NULL.
parent
eadf18b9fa
commit
9b45ba82fd
|
@ -96,12 +96,10 @@ cmd_load_buffer_exec(struct cmd *self, struct cmdq_item *item)
|
||||||
const char *bufname = args_get(args, 'b');
|
const char *bufname = args_get(args, 'b');
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
cdata = xmalloc(sizeof *cdata);
|
cdata = xcalloc(1, sizeof *cdata);
|
||||||
cdata->item = item;
|
cdata->item = item;
|
||||||
if (bufname != NULL)
|
if (bufname != NULL)
|
||||||
cdata->name = xstrdup(bufname);
|
cdata->name = xstrdup(bufname);
|
||||||
else
|
|
||||||
cdata->name = NULL;
|
|
||||||
if (args_has(args, 'w') && tc != NULL) {
|
if (args_has(args, 'w') && tc != NULL) {
|
||||||
cdata->client = tc;
|
cdata->client = tc;
|
||||||
cdata->client->references++;
|
cdata->client->references++;
|
||||||
|
|
Loading…
Reference in New Issue