| 513 | } |
| 514 | |
| 515 | int acl_xml2_free(ACL_XML2 *xml) |
| 516 | { |
| 517 | int node_cnt = xml->node_cnt; |
| 518 | |
| 519 | acl_htable_free(xml->id_table, NULL); |
| 520 | |
| 521 | #ifdef ACL_UNIX |
| 522 | if (xml->fd >= 0) |
| 523 | #else |
| 524 | if (xml->fd != ACL_FILE_INVALID) |
| 525 | #endif |
| 526 | acl_file_close(xml->fd); |
| 527 | |
| 528 | if (xml->vbuf_inner != NULL) |
| 529 | acl_vstring_free(xml->vbuf_inner); |
| 530 | |
| 531 | if (xml->dbuf_inner != NULL) |
| 532 | acl_dbuf_pool_destroy(xml->dbuf_inner); |
| 533 | |
| 534 | return node_cnt - 1; |
| 535 | } |
| 536 | |
| 537 | void acl_xml2_reset(ACL_XML2 *xml) |
| 538 | { |
no test coverage detected
searching dependent graphs…