Re: [PATCH] kernel/workqueue.c: kfree issue, need check flag'WQ_UNBOUND' when processing failure.

From: Tejun Heo
Date: Tue May 14 2013 - 11:20:55 EST


On Tue, May 14, 2013 at 09:06:40PM +0800, Chen Gang wrote:
> err_destroy:
> destroy_workqueue(wq);
> + if (flags & WQ_UNBOUND) {
> +err_free_wq:
> + free_workqueue_attrs(wq->unbound_attrs);
> + kfree(wq);
> + }

Doesn't the above make the code free wq twice on after err_destroy?

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/