diff --git a/src/qpack-tbl.c b/src/qpack-tbl.c index 7c59fd2f7..e069464f5 100644 --- a/src/qpack-tbl.c +++ b/src/qpack-tbl.c @@ -394,6 +394,9 @@ int qpack_dht_insert(struct qpack_dht *dht, struct ist name, struct ist value) else { /* need to defragment the table before inserting upfront */ dht = qpack_dht_defrag(dht); + if (!dht) + return -1; + wrap = dht->wrap + 1; head = dht->head + 1; dht->dte[head].addr = dht->dte[dht->front].addr - (name.len + value.len);