summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-16 05:45:01 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-16 05:45:01 +0200
commitcab67b91b8cc2f73f3e1eb2d24aa34a579475cc5 (patch)
tree1ec20680fdda4473e5f8589b5bb3cdb792e604f7 /src
parent0565d0e84348bd15e79f48c0059ef748b80e43a0 (diff)
downloadfastd-cab67b91b8cc2f73f3e1eb2d24aa34a579475cc5.tar
fastd-cab67b91b8cc2f73f3e1eb2d24aa34a579475cc5.zip
Fix segfault on single peer includes without name
Diffstat (limited to 'src')
-rw-r--r--src/config.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/config.y b/src/config.y
index e603e7c..989b174 100644
--- a/src/config.y
+++ b/src/config.y
@@ -519,7 +519,8 @@ forward: boolean { conf->forward = $1; }
include: TOK_PEER TOK_STRING maybe_as {
fastd_peer_config_new(ctx, conf);
- conf->peers->name = strdup($3->str);
+ if ($3)
+ conf->peers->name = strdup($3->str);
if (!fastd_read_config(ctx, conf, $2->str, true, depth))
YYERROR;