aboutsummaryrefslogtreecommitdiff
path: root/paste.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2014-02-21 08:03:42 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2014-02-21 08:03:42 +0000
commitc310212d28947f35595d945936e04148a39246d8 (patch)
tree93447903c46b28e0bafe6fa234dc245d72bd00a0 /paste.c
parent94d99d54629b182a4266d918ccf80e4daee4567b (diff)
parent9120df33efdbaac82c152ed3d5995e2be7a70411 (diff)
downloadrtmux-c310212d28947f35595d945936e04148a39246d8.tar.gz
rtmux-c310212d28947f35595d945936e04148a39246d8.tar.bz2
rtmux-c310212d28947f35595d945936e04148a39246d8.zip
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'paste.c')
-rw-r--r--paste.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/paste.c b/paste.c
index 7cbbbfb3..bc9b4686 100644
--- a/paste.c
+++ b/paste.c
@@ -130,8 +130,10 @@ paste_replace(struct paste_stack *ps, u_int idx, char *data, size_t size)
{
struct paste_buffer *pb;
- if (size == 0)
+ if (size == 0) {
+ free(data);
return (0);
+ }
if (idx >= ARRAY_LENGTH(ps))
return (-1);