summaryrefslogtreecommitdiffstats
path: root/paste.c
diff options
context:
space:
mode:
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 8a110299..2f2c043b 100644
--- a/paste.c
+++ b/paste.c
@@ -162,8 +162,10 @@ paste_add(char *data, size_t size)
struct paste_buffer *pb, *pb1;
u_int limit;
- if (size == 0)
+ if (size == 0) {
+ free(data);
return;
+ }
limit = options_get_number(global_options, "buffer-limit");
RB_FOREACH_REVERSE_SAFE(pb, paste_time_tree, &paste_by_time, pb1) {