IB/qib: Fix memory leak of recv context when driver fails to initialize.

In qib_create_ctxts() we allocate an array to hold recv contexts. Then attempt
to create data for those recv contexts. If that call to qib_create_ctxtdata()
fails then an error is returned but the previously allocated memory is not
freed.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
Dennis Dalessandro 2014-03-17 14:07:16 -04:00 • committed by Roland Dreier
commit 06064a103f