crypto/qat: free cookie pool on queue creation error
authorFiona Trahe <fiona.trahe@intel.com>
Wed, 13 Jun 2018 12:14:12 +0000 (14:14 +0200)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 27 Jun 2018 23:25:33 +0000 (01:25 +0200)
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
drivers/crypto/qat/qat_qp.c

index 9938c14..569eace 100644 (file)
@@ -248,6 +248,9 @@ int qat_qp_setup(struct qat_pci_device *qat_dev,
        return 0;
 
 create_err:
+       if (qp->op_cookie_pool)
+               rte_mempool_free(qp->op_cookie_pool);
+       rte_free(qp->op_cookies);
        rte_free(qp);
        return -EFAULT;
 }