fix message refcounting

This commit is contained in:
Felix Fietkau 2011-02-06 01:45:21 +01:00
parent 4ae1159f62
commit 88411527be

View file

@ -95,7 +95,7 @@ static void ubus_msg_enqueue(struct ubus_client *cl, struct ubus_msg_buf *ub)
if (cl->tx_queue[cl->txq_tail]) if (cl->tx_queue[cl->txq_tail])
return; return;
cl->tx_queue[cl->txq_tail] = ub; cl->tx_queue[cl->txq_tail] = ubus_msg_ref(ub);
cl->txq_tail = (cl->txq_tail + 1) % ARRAY_SIZE(cl->tx_queue); cl->txq_tail = (cl->txq_tail + 1) % ARRAY_SIZE(cl->tx_queue);
} }