]> Git Repo - linux.git/commitdiff
ieee802154: fix one possible memleak in ca8210_dev_com_init
authorLiu Jian <[email protected]>
Mon, 20 Jul 2020 14:33:15 +0000 (22:33 +0800)
committerStefan Schmidt <[email protected]>
Tue, 21 Jul 2020 08:31:33 +0000 (10:31 +0200)
We should call destroy_workqueue to destroy mlme_workqueue in error branch.

Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver")
Signed-off-by: Liu Jian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stefan Schmidt <[email protected]>
drivers/net/ieee802154/ca8210.c

index e04c3b60cae78fb56ab22510e3cff13748ac7485..4eb64709d44cb09865d23d9e34ea5d53a9cfe6b4 100644 (file)
@@ -2925,6 +2925,7 @@ static int ca8210_dev_com_init(struct ca8210_priv *priv)
        );
        if (!priv->irq_workqueue) {
                dev_crit(&priv->spi->dev, "alloc of irq_workqueue failed!\n");
+               destroy_workqueue(priv->mlme_workqueue);
                return -ENOMEM;
        }
 
This page took 0.065298 seconds and 4 git commands to generate.