18/01/2021 16:16, Xueming Li: > --- a/lib/librte_eal/common/eal_common_devargs.c > +++ b/lib/librte_eal/common/eal_common_devargs.c > + if (ret != 0) { > + if (devargs->data && devargs->data != devstr) {
Better to make comparison explicit: if (devargs->data != NULL > + /* Free duplicated data. */ > + free(devargs->data); Before patch 2, devargs->data is const, so we cannot free (compilation error).