* xmlFreeParserInputBuffer: * @in: a buffered parser input * * Free up the memory used by a buffered parser input */
| 1487 | * Free up the memory used by a buffered parser input |
| 1488 | */ |
| 1489 | void |
| 1490 | xmlFreeParserInputBuffer(xmlParserInputBufferPtr in) { |
| 1491 | if (in == NULL) return; |
| 1492 | |
| 1493 | if (in->raw) { |
| 1494 | xmlBufFree(in->raw); |
| 1495 | in->raw = NULL; |
| 1496 | } |
| 1497 | if (in->encoder != NULL) { |
| 1498 | xmlCharEncCloseFunc(in->encoder); |
| 1499 | } |
| 1500 | if (in->closecallback != NULL) { |
| 1501 | in->closecallback(in->context); |
| 1502 | } |
| 1503 | if (in->buffer != NULL) { |
| 1504 | xmlBufFree(in->buffer); |
| 1505 | in->buffer = NULL; |
| 1506 | } |
| 1507 | |
| 1508 | xmlFree(in); |
| 1509 | } |
| 1510 | |
| 1511 | #ifdef LIBXML_OUTPUT_ENABLED |
| 1512 | /** |
no test coverage detected