From: Maria Matejka Date: Wed, 14 Aug 2019 09:49:20 +0000 (+0200) Subject: Filter: Don't alloc varargs array if its length would be zero X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f31be45de1a69f59327c3316c9d612b9248bd280;p=thirdparty%2Fbird.git Filter: Don't alloc varargs array if its length would be zero --- diff --git a/filter/decl.m4 b/filter/decl.m4 index 71ac8803a..a5cead756 100644 --- a/filter/decl.m4 +++ b/filter/decl.m4 @@ -143,7 +143,7 @@ FID_IFCONST([[ } FID_IFCONST([[ const struct f_inst **items = NULL; - if (constargs) { + if (constargs && whati->varcount) { items = alloca(whati->varcount * sizeof(struct f_inst *)); const struct f_inst *child = fvar; for (uint i=0; child; i++)