Repository navigation
Conversation
They should restore the child pointers even in case of a write failure.
| return 0; | ||
|
|
||
| cleanup: | ||
| node->children = child; |
There was a problem hiding this comment.
question: do we need to set node->last throughout the whole workflow too ? I think not but ...
There was a problem hiding this comment.
No, the loops that use the node only care about the next and children fields, not last.
iliaal
left a comment
There was a problem hiding this comment.
LGTM.
Unrelated, but nearby: a userland stream_write() that runs during the xmlSaveFlush() here sees an empty document and can insert into it, which leaves children/last inconsistent and segv on a later append. I'll make a PR, unless you want to tackle it or fold-it-in.
|
Yeah you're correct unfortunately. I pushed out a fix for that into this PR. It now makes a shallow copy of the document just for the declaration. |
iliaal
left a comment
There was a problem hiding this comment.
looks good, thanks for making the changes
They should restore the children pointer even in case of a write failure.