summaryrefslogtreecommitdiffstats
path: root/cmd-paste-buffer.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-09-14 12:42:19 +0100
committerThomas Adam <thomas@xteddy.org>2015-09-14 12:42:19 +0100
commit74b958ecbed7102a0f3f5faf5d976411726661ba (patch)
tree7b0cc592b9127fe05afc9bbbf67263489d66eb85 /cmd-paste-buffer.c
parentef35c9f7659205659d6863058b9a7262b21440a5 (diff)
parent16efa8483888e326aed2c05a01b63b45a2b118ef (diff)
Merge branch 'obsd-master'
Conflicts: Makefile
Diffstat (limited to 'cmd-paste-buffer.c')
-rw-r--r--cmd-paste-buffer.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/cmd-paste-buffer.c b/cmd-paste-buffer.c
index 5027a4f8..1c83ee7b 100644
--- a/cmd-paste-buffer.c
+++ b/cmd-paste-buffer.c
@@ -101,12 +101,8 @@ cmd_paste_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
bufferevent_write(wp->event, "\033[201~", 6);
}
- if (args_has(args, 'd')) {
- if (bufname == NULL)
- paste_free_top();
- else
- paste_free_name(bufname);
- }
+ if (pb != NULL && args_has(args, 'd'))
+ paste_free(pb);
return (CMD_RETURN_NORMAL);
}