MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlBufFree

Function xmlBufFree

ThirdParty/libxml2/vtklibxml2/buf.c:275–288  ·  view source on GitHub ↗

* xmlBufFree: * @buf: the buffer to free * * Frees an XML buffer. It frees both the content and the structure which * encapsulate it. */

Source from the content-addressed store, hash-verified

273 * encapsulate it.
274 */
275void
276xmlBufFree(xmlBufPtr buf) {
277 if (buf == NULL) {
278 return;
279 }
280
281 if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
282 (buf->contentIO != NULL)) {
283 xmlFree(buf->contentIO);
284 } else if (buf->content != NULL) {
285 xmlFree(buf->content);
286 }
287 xmlFree(buf);
288}
289
290/**
291 * xmlBufEmpty:

Callers 15

xmlTextReaderReadStringFunction · 0.85
xmlNewTextReaderFunction · 0.85
xmlFreeTextReaderFunction · 0.85
xmlTextReaderConstValueFunction · 0.85
xmlNodeGetContentFunction · 0.85
xmlBufBackToBufferFunction · 0.85
xmlSaveClearEncodingFunction · 0.85
xmlAllocOutputBufferFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected