diff options
author | nicm <nicm> | 2017-01-24 13:28:33 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-01-24 13:28:33 +0000 |
commit | 3d74e89a395838e5c9c4ea101a9366be09bf03c7 (patch) | |
tree | bd06ce22c748e13a05ec84606202d1f60eb51835 /paste.c | |
parent | 98e7fbb2acee0238381feea5d583fc439aae08e2 (diff) | |
download | rtmux-3d74e89a395838e5c9c4ea101a9366be09bf03c7.tar.gz rtmux-3d74e89a395838e5c9c4ea101a9366be09bf03c7.tar.bz2 rtmux-3d74e89a395838e5c9c4ea101a9366be09bf03c7.zip |
Shorten a long line, and don't leak buffer in paste_add if size is zero.
Diffstat (limited to 'paste.c')
-rw-r--r-- | paste.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -163,8 +163,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) { |