Skip to content

Commit

Permalink
Fix unconditional yaml_free()
Browse files Browse the repository at this point in the history
Thanks to @tlsa for spotting this
  • Loading branch information
perlpunk committed Jul 18, 2018
1 parent f033001 commit df5c05e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,8 @@ yaml_parser_process_directives(yaml_parser_t *parser,
STACK_DEL(parser, tag_directives);
}

yaml_free(version_directive);
if (!version_directive_ref)
yaml_free(version_directive);
return 1;

error:
Expand Down

0 comments on commit df5c05e

Please sign in to comment.