parse.y: fix memory leak after "&derepcated" without string

The "TOK_CONSTANT" leaks.
This commit is contained in:
Max Kellermann 2020-02-21 18:37:52 +01:00
parent 7f97f74203
commit 32786c7645

View file

@ -1363,6 +1363,7 @@ attr:
{ {
ODesc d; ODesc d;
$3->Describe(&d); $3->Describe(&d);
Unref($3);
reporter->Error("'&deprecated=%s' must use a string literal", reporter->Error("'&deprecated=%s' must use a string literal",
d.Description()); d.Description());
$$ = new Attr(ATTR_DEPRECATED); $$ = new Attr(ATTR_DEPRECATED);