From 32786c76457b85be4955023933ff6af9fe3ee1ac Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 21 Feb 2020 18:37:52 +0100 Subject: [PATCH] parse.y: fix memory leak after "&derepcated" without string The "TOK_CONSTANT" leaks. --- src/parse.y | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parse.y b/src/parse.y index 6106b04482..fe4910e250 100644 --- a/src/parse.y +++ b/src/parse.y @@ -1363,6 +1363,7 @@ attr: { ODesc d; $3->Describe(&d); + Unref($3); reporter->Error("'&deprecated=%s' must use a string literal", d.Description()); $$ = new Attr(ATTR_DEPRECATED);