Commit 345003c9 authored by Scott Vokes's avatar Scott Vokes
Browse files

grow_buffer should never shrink the buffer.

parent 0770a116
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -851,6 +851,8 @@ static void notify_caller(int fd) {
}

static bool grow_read_buf(listener *l, size_t nsize) {
    if (nsize < l->read_buf_size) { return true; }

    uint8_t *nbuf = realloc(l->read_buf, nsize);
    if (nbuf) {
        struct bus *b = l->bus;