mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-10-31 18:42:30 +00:00
Use xmlFreeNsList to deallocate xmlNsPtr
Previously xmlFree only freed the top-level allocation and not the entire linked list. Multiple namespaces should be rare but perhaps some S3 implementations have both a global and local namespace. The xmlFree(void*) prototype hid the type mismatch.
This commit is contained in:
parent
70a30d6e26
commit
ea8109bce0
@ -64,11 +64,6 @@
|
||||
xmlFreeDoc(doc); \
|
||||
S3FS_MALLOCTRIM(0); \
|
||||
}while(0)
|
||||
#define S3FS_XMLFREE(ptr) \
|
||||
do{ \
|
||||
xmlFree(ptr); \
|
||||
S3FS_MALLOCTRIM(0); \
|
||||
}while(0)
|
||||
#define S3FS_XMLXPATHFREECONTEXT(ctx) \
|
||||
do{ \
|
||||
xmlXPathFreeContext(ctx); \
|
||||
|
@ -73,7 +73,7 @@ static bool GetXmlNsUrl(xmlDocPtr doc, std::string& nsurl)
|
||||
strNs = std::string(reinterpret_cast<const char*>(nslist[0]->href), len);
|
||||
}
|
||||
}
|
||||
S3FS_XMLFREE(nslist);
|
||||
xmlFreeNsList(*nslist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user