* xmlFreeSaveCtxt: * * Free a saving context, destroying the output in any remaining buffer */
| 309 | * Free a saving context, destroying the output in any remaining buffer |
| 310 | */ |
| 311 | static void |
| 312 | xmlFreeSaveCtxt(xmlSaveCtxtPtr ctxt) |
| 313 | { |
| 314 | if (ctxt == NULL) return; |
| 315 | if (ctxt->encoding != NULL) |
| 316 | xmlFree((char *) ctxt->encoding); |
| 317 | if (ctxt->buf != NULL) |
| 318 | xmlOutputBufferClose(ctxt->buf); |
| 319 | xmlFree(ctxt); |
| 320 | } |
| 321 | |
| 322 | /** |
| 323 | * xmlNewSaveCtxt: |
no test coverage detected