summaryrefslogtreecommitdiffstats
path: root/paste.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-01-24 14:01:15 +0000
committerThomas Adam <thomas@xteddy.org>2017-01-24 14:01:15 +0000
commitf1282a683de191d00e6f71cc4a7d4c9646fff3de (patch)
tree791864b06b0b4127781b214096b7925dbd29ec43 /paste.c
parentc68ea386d13a08d89c2fcd1fd3f0dde91fd0ff27 (diff)
parent3d74e89a395838e5c9c4ea101a9366be09bf03c7 (diff)
Merge branch 'obsd-master'
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) {