]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Fix memory leak in mlx5_ib_create_flow
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Thu, 7 Jun 2018 19:19:15 +0000 (14:19 -0500)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 11 Jun 2018 17:02:27 +0000 (11:02 -0600)
commitc01721ba29fc2f196c09d4d94582d17dece541df
tree0e3e887be8a7d061f9c9239b2e85ea8ae33bed6b
parent09c6b03a51d8f4d9c77acbb37e58a4a6cdd33dc0
IB/mlx5: Fix memory leak in mlx5_ib_create_flow

In case memory resources for *ucmd* were allocated, release them
before return.

Addresses-Coverity-ID: 1469857 ("Resource leak")
Fixes: 5f57985317bf ("IB/mlx5: Add flow counters binding support")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c