The pd is already allocated when idr_pre_get is called. So, must deallocate
on error.

Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>

Index: core/uverbs_cmd.c
===================================================================
--- core/uverbs_cmd.c   (revision 1922)
+++ core/uverbs_cmd.c   (working copy)
@@ -154,7 +154,7 @@ ssize_t ib_uverbs_alloc_pd(struct ib_uve
 retry:
        if (!idr_pre_get(&ib_uverbs_pd_idr, GFP_KERNEL)) {
                ret = -ENOMEM;
-               goto err;
+               goto err_pd;
        }
 
        down(&ib_uverbs_idr_mutex);

-- 
MST - Michael S. Tsirkin
_______________________________________________
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to