[IBAL] Fix error handling in __proxy_mad_recv_cb to not release a spinlock
[mirror/winof/.git] / core / al / kernel / al_proxy_subnet.c
index 0769c3f..4d66ff8 100644 (file)
@@ -697,7 +697,11 @@ __proxy_mad_recv_cb(
         * we're cleaning up the callback lists.\r
         */\r
        if( !proxy_context_ref( p_context ) )\r
-               goto proxy_mad_recv_cb_err;\r
+       {\r
+               proxy_put_mad( p_mad_element );\r
+               CL_EXIT( ( AL_DBG_PROXY_CB | AL_DBG_MAD ), g_al_dbg_lvl );\r
+               return;\r
+       }\r
 \r
        /* Insert an item to track the MAD until the user fetches it. */\r
        cl_spinlock_acquire( &p_context->h_al->obj.lock );\r