aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-06-25 00:42:25 +0200
committerChristian Grothoff <christian@grothoff.org>2017-06-25 00:42:25 +0200
commite15ee8365a5eb40aaf2448c4f649af30297d6817 (patch)
tree71e42aac4549c0b17f8a273141a7ed18cc231f34 /src
parente29410cee115f099f093605692ec94614fbbe6d9 (diff)
downloadgnunet-e15ee8365a5eb40aaf2448c4f649af30297d6817.tar.gz
gnunet-e15ee8365a5eb40aaf2448c4f649af30297d6817.zip
fix crash if block plugin not found
Diffstat (limited to 'src')
-rw-r--r--src/block/block.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/block/block.c b/src/block/block.c
index 4b6f3826d..bbf45477c 100644
--- a/src/block/block.c
+++ b/src/block/block.c
@@ -151,10 +151,9 @@ GNUNET_BLOCK_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg)
151void 151void
152GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx) 152GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx)
153{ 153{
154 unsigned int i;
155 struct Plugin *plugin; 154 struct Plugin *plugin;
156 155
157 for (i = 0; i < ctx->num_plugins; i++) 156 for (unsigned int i = 0; i < ctx->num_plugins; i++)
158 { 157 {
159 plugin = ctx->plugins[i]; 158 plugin = ctx->plugins[i];
160 GNUNET_break (NULL == 159 GNUNET_break (NULL ==
@@ -301,6 +300,8 @@ GNUNET_BLOCK_group_create (struct GNUNET_BLOCK_Context *ctx,
301 300
302 plugin = find_plugin (ctx, 301 plugin = find_plugin (ctx,
303 type); 302 type);
303 if (NULL == plugin)
304 return NULL;
304 if (NULL == plugin->create_group) 305 if (NULL == plugin->create_group)
305 return NULL; 306 return NULL;
306 va_start (ap, 307 va_start (ap,