MCPcopy Create free account
hub / github.com/Kitware/CMake / XML_ParserFree

Function XML_ParserFree

Utilities/cmexpat/lib/xmlparse.c:1919–2012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1917}
1918
1919void XMLCALL
1920XML_ParserFree(XML_Parser parser) {
1921 TAG *tagList;
1922 OPEN_INTERNAL_ENTITY *entityList;
1923 if (parser == NULL)
1924 return;
1925 /* free m_tagStack and m_freeTagList */
1926 tagList = parser->m_tagStack;
1927 for (;;) {
1928 TAG *p;
1929 if (tagList == NULL) {
1930 if (parser->m_freeTagList == NULL)
1931 break;
1932 tagList = parser->m_freeTagList;
1933 parser->m_freeTagList = NULL;
1934 }
1935 p = tagList;
1936 tagList = tagList->parent;
1937 FREE(parser, p->buf);
1938 destroyBindings(p->bindings, parser);
1939 FREE(parser, p);
1940 }
1941 /* free m_openInternalEntities and m_freeInternalEntities */
1942 entityList = parser->m_openInternalEntities;
1943 for (;;) {
1944 OPEN_INTERNAL_ENTITY *openEntity;
1945 if (entityList == NULL) {
1946 if (parser->m_freeInternalEntities == NULL)
1947 break;
1948 entityList = parser->m_freeInternalEntities;
1949 parser->m_freeInternalEntities = NULL;
1950 }
1951 openEntity = entityList;
1952 entityList = entityList->next;
1953 FREE(parser, openEntity);
1954 }
1955 /* free m_openAttributeEntities and m_freeAttributeEntities */
1956 entityList = parser->m_openAttributeEntities;
1957 for (;;) {
1958 OPEN_INTERNAL_ENTITY *openEntity;
1959 if (entityList == NULL) {
1960 if (parser->m_freeAttributeEntities == NULL)
1961 break;
1962 entityList = parser->m_freeAttributeEntities;
1963 parser->m_freeAttributeEntities = NULL;
1964 }
1965 openEntity = entityList;
1966 entityList = entityList->next;
1967 FREE(parser, openEntity);
1968 }
1969 /* free m_openValueEntities and m_freeValueEntities */
1970 entityList = parser->m_openValueEntities;
1971 for (;;) {
1972 OPEN_INTERNAL_ENTITY *openEntity;
1973 if (entityList == NULL) {
1974 if (parser->m_freeValueEntities == NULL)
1975 break;
1976 entityList = parser->m_freeValueEntities;

Callers 4

xmlparse.cFile · 0.85
expat_read_tocFunction · 0.85
CleanupParserMethod · 0.85

Calls 3

destroyBindingsFunction · 0.85
poolDestroyFunction · 0.85
dtdDestroyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…