From: Felix Fietkau Date: Sun, 6 Feb 2011 00:45:21 +0000 (+0100) Subject: fix message refcounting X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fubus.git;a=commitdiff_plain;h=88411527bec40d196dc365a29b0e3cd3e6b6bc1d fix message refcounting --- diff --git a/ubusd.c b/ubusd.c index bd437a5..491659d 100644 --- a/ubusd.c +++ b/ubusd.c @@ -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]) 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); }