From cab67b91b8cc2f73f3e1eb2d24aa34a579475cc5 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 16 Aug 2013 05:45:01 +0200 Subject: Fix segfault on single peer includes without name --- src/config.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3