X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fbus%2Fpci%2Flinux%2Fpci_uio.c;h=09ecbb7aad25c86d92bd68c76c001b5c18666206;hb=9cea8774cf1c466cdd6dc8bade4350cc28161905;hp=a7c14421aa79e42d33ac85168feead58bdf30b27;hpb=4a928ef9f6114d119899b95ba47acc0e9562f7a5;p=dpdk.git diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c index a7c14421aa..09ecbb7aad 100644 --- a/drivers/bus/pci/linux/pci_uio.c +++ b/drivers/bus/pci/linux/pci_uio.c @@ -296,7 +296,7 @@ pci_uio_map_resource_by_index(struct rte_pci_device *dev, int res_idx, maps = uio_res->maps; /* allocate memory to keep path */ - maps[map_idx].path = rte_malloc(NULL, strlen(devname) + 1, 0); + maps[map_idx].path = rte_malloc(NULL, sizeof(devname), 0); if (maps[map_idx].path == NULL) { RTE_LOG(ERR, EAL, "Cannot allocate memory for path: %s\n", strerror(errno));