Commit 3a0d3a2
committed
Return early in yaml_emitter_close
If yaml_emitter_dump failed, the emitter might be in a broken
state and have leftover states/events.
yaml_emitter_close calls yaml_emitter_emit which will
try to emit those events, so we should return early.
The recommended thing to do for library users is to abort
when yaml_emitter_dump fails, but it's easy to add a check
here as well.1 parent 840b65c commit 3a0d3a2
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
0 commit comments