X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=drivers%2Fbus%2Fpci%2Flinux%2Fpci_uio.c;h=39176ac73a3e6c544284bd392ace0fc4da55c516;hb=597cb1874068054d4c0be41f161a72ef37888930;hp=92b7f027554a4f0facb22e6c606b43e0bd51ec74;hpb=6e7cbd63706f3435b9d9a2057a37db1da01db9a7;p=deb_dpdk.git diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c index 92b7f027..39176ac7 100644 --- a/drivers/bus/pci/linux/pci_uio.c +++ b/drivers/bus/pci/linux/pci_uio.c @@ -328,7 +328,7 @@ pci_uio_map_resource_by_index(struct rte_pci_device *dev, int res_idx, loc->function, res_idx); /* 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));