Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not register broken plugins
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 7 Aug 2005 18:56:35 +0000 (18:56 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 7 Aug 2005 18:56:35 +0000 (18:56 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1625 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Transport/transport.c

index 6417ea3..444f8c4 100644 (file)
@@ -35,13 +35,15 @@ gras_trp_plugin_new(const char *name, gras_trp_setup_t setup) {
       /* SG plugin raise mismatch when in RL mode (and vice versa) */
       free(plug->name);
       free(plug);
+      plug=NULL;
       xbt_ex_free(e);
     } else {
       RETHROW;
     }
   }
 
-  xbt_dict_set(_gras_trp_plugins, name, plug, gras_trp_plugin_free);
+  if (plug)
+    xbt_dict_set(_gras_trp_plugins, name, plug, gras_trp_plugin_free);
 }
 
 void gras_trp_init(void){