diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-16 05:45:01 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-16 05:45:01 +0200 |
commit | cab67b91b8cc2f73f3e1eb2d24aa34a579475cc5 (patch) | |
tree | 1ec20680fdda4473e5f8589b5bb3cdb792e604f7 | |
parent | 0565d0e84348bd15e79f48c0059ef748b80e43a0 (diff) | |
download | fastd-cab67b91b8cc2f73f3e1eb2d24aa34a579475cc5.tar fastd-cab67b91b8cc2f73f3e1eb2d24aa34a579475cc5.zip |
Fix segfault on single peer includes without name
-rw-r--r-- | src/config.y | 3 |
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; |