diff --git a/src/hubio.c b/src/hubio.c index e06462f..46c6069 100644 --- a/src/hubio.c +++ b/src/hubio.c @@ -65,7 +65,10 @@ size_t hub_recvq_set(struct hub_recvq* q, void* buf, size_t bufsize) } if (!bufsize) + { + q->size = 0; return 0; + } q->buf = hub_malloc(bufsize); if (!q->buf)