RDMA/ocrdma: Fix memory leak in _ocrdma_alloc_pd()
authorRoland Dreier <roland@purestorage.com>
Sat, 30 May 2015 06:10:31 +0000 (23:10 -0700)
committerDoug Ledford <dledford@redhat.com>
Tue, 2 Jun 2015 13:22:31 +0000 (09:22 -0400)
commit18eaf1f1959add9bbbfa5442fc5d9b59f7d4e1bd
tree59f5181b652e0425526622f81d820112ce22fe14
parentd655a9fbc8a51ac8d92db7ff5a599aab17dce3ca
RDMA/ocrdma: Fix memory leak in _ocrdma_alloc_pd()

If ocrdma_get_pd_num() fails, then we need to free the pd struct we allocated.

This was detected by Coverity (CID 1271245).

Signed-off-by: Roland Dreier <roland@purestorage.com>
Acked-By: Devesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c