projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e29410c
)
fix crash if block plugin not found
author
Christian Grothoff
<christian@grothoff.org>
Sat, 24 Jun 2017 22:42:25 +0000
(
00:42
+0200)
committer
Christian Grothoff
<christian@grothoff.org>
Sat, 24 Jun 2017 22:42:25 +0000
(
00:42
+0200)
src/block/block.c
patch
|
blob
|
history
diff --git
a/src/block/block.c
b/src/block/block.c
index 4b6f3826d9251419658273d4db6f7d3d62c361e5..bbf45477cd64d156ea46c09defaa62ad763e9c6e 100644
(file)
--- a/
src/block/block.c
+++ b/
src/block/block.c
@@
-151,10
+151,9
@@
GNUNET_BLOCK_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg)
void
GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx)
{
- unsigned int i;
struct Plugin *plugin;
- for (i = 0; i < ctx->num_plugins; i++)
+ for (
unsigned int
i = 0; i < ctx->num_plugins; i++)
{
plugin = ctx->plugins[i];
GNUNET_break (NULL ==
@@
-301,6
+300,8
@@
GNUNET_BLOCK_group_create (struct GNUNET_BLOCK_Context *ctx,
plugin = find_plugin (ctx,
type);
+ if (NULL == plugin)
+ return NULL;
if (NULL == plugin->create_group)
return NULL;
va_start (ap,