summaryrefslogtreecommitdiffstats
path: root/pcilib/xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/xml.c')
-rw-r--r--pcilib/xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcilib/xml.c b/pcilib/xml.c
index 4e95437..adca34e 100644
--- a/pcilib/xml.c
+++ b/pcilib/xml.c
@@ -600,7 +600,7 @@ static int pcilib_xml_create_transform_view(pcilib_t *ctx, xmlXPathContextPtr xp
desc.write_to_reg = value;
if ((value)&&(*value)) mode |= PCILIB_ACCESS_W;
} else if (!strcasecmp(name, "script")) {
- desc.module = malloc(strlen(value));
+ desc.module = strdup(value);
sprintf(desc.module, "%s", value);
break;
}