mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
bugfix: check for 0 before free_ref
This commit is contained in:
@@ -615,7 +615,8 @@ PgfExpr pgf_read_expr(PgfText *input, PgfUnmarshaller *u)
|
||||
PgfExprParser parser(input, u);
|
||||
PgfExpr res = parser.parse_expr();
|
||||
if (!parser.eof()) {
|
||||
u->free_ref(res);
|
||||
if (res != 0)
|
||||
u->free_ref(res);
|
||||
return 0;
|
||||
}
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user