summaryrefslogtreecommitdiffstats
path: root/pcilib/xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/xml.c')
-rw-r--r--pcilib/xml.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pcilib/xml.c b/pcilib/xml.c
index fe25cf7..5be5abd 100644
--- a/pcilib/xml.c
+++ b/pcilib/xml.c
@@ -138,6 +138,7 @@ pcilib_get_associated_views(pcilib_t* ctx, const char* reg_name,xmlXPathContextP
}
xmlXPathFreeObject(nodes);
+ free(path);
return 0;
}
@@ -507,7 +508,6 @@ pcilib_xml_create_unit(pcilib_t *ctx, xmlXPathContextPtr xpath, xmlDocPtr doc, x
attr=node->properties;
value=(char*)attr->children->content;
desc.name=value;
- desc.other_units=malloc(sizeof(pcilib_transform_unit_t));
for (cur = node->children; cur != NULL; cur = cur->next) {
if (!cur->children) continue;
@@ -520,7 +520,6 @@ pcilib_xml_create_unit(pcilib_t *ctx, xmlXPathContextPtr xpath, xmlDocPtr doc, x
if (!value || !attr) continue;
if (!strcasecmp(name, "convert_unit")) {
- desc.other_units=realloc(desc.other_units,(i+1)*sizeof(pcilib_transform_unit_t));
desc.other_units[i].name=value2;
desc.other_units[i].transform_formula=value;
i++;