[IBAL] Fix crash when creating a MAD service with duplicate
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 16 Nov 2005 17:25:13 +0000 (17:25 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 16 Nov 2005 17:25:13 +0000 (17:25 +0000)
settings to an existing one.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@153 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_mad.c

index 6c9d1e7..a76b7eb 100644 (file)
@@ -1256,13 +1256,16 @@ __destroying_mad_svc(
         * Since the MAD service is being destroyed, the user cannot be issuing\r
         * sends.\r
         */\r
+       if( h_mad_svc->h_mad_reg )\r
+       {\r
 #ifdef CL_KERNEL\r
-       old_irql = KeRaiseIrqlToDpcLevel();\r
+               old_irql = KeRaiseIrqlToDpcLevel();\r
 #endif\r
-       __check_send_queue( h_mad_svc );\r
+               __check_send_queue( h_mad_svc );\r
 #ifdef CL_KERNEL\r
-       KeLowerIrql( old_irql );\r
+               KeLowerIrql( old_irql );\r
 #endif\r
+       }\r
 \r
        cl_timer_destroy( &h_mad_svc->send_timer );\r
 \r