-check return value
[oweals/gnunet.git] / src / peerinfo-tool / gnunet-peerinfo_plugins.c
index 29dc4d01773d243b59f4a4ce85b179faf449d60d..37553f2f7df587b0041f310d7b035278ec740fa1 100644 (file)
@@ -109,7 +109,7 @@ GPI_plugins_load (const struct GNUNET_CONFIGURATION_Handle *cfg)
     GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Loading `%s' transport plugin\n"),
                 pos);
     GNUNET_asprintf (&libname, "libgnunet_plugin_transport_%s", pos);
-    plug = GNUNET_malloc (sizeof (struct TransportPlugin));
+    plug = GNUNET_new (struct TransportPlugin);
     plug->short_name = GNUNET_strdup (pos);
     plug->lib_name = libname;
     plug->env.cfg = cfg;