=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-load-buffer.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- src/usr.bin/tmux/cmd-load-buffer.c 2020/09/02 13:46:35 1.61 +++ src/usr.bin/tmux/cmd-load-buffer.c 2020/09/04 12:24:25 1.62 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-load-buffer.c,v 1.61 2020/09/02 13:46:35 nicm Exp $ */ +/* $OpenBSD: cmd-load-buffer.c,v 1.62 2020/09/04 12:24:25 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -96,12 +96,10 @@ const char *bufname = args_get(args, 'b'); char *path; - cdata = xmalloc(sizeof *cdata); + cdata = xcalloc(1, sizeof *cdata); cdata->item = item; if (bufname != NULL) cdata->name = xstrdup(bufname); - else - cdata->name = NULL; if (args_has(args, 'w') && tc != NULL) { cdata->client = tc; cdata->client->references++;