net/failsafe: fix invalid free
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Thu, 18 Jan 2018 13:51:39 +0000 (13:51 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sun, 21 Jan 2018 14:51:52 +0000 (15:51 +0100)
rte_free() is not supposed to work with pointers returned by calloc().

Fixes: a0194d828100 ("net/failsafe: add flexible device definition")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/failsafe/failsafe_args.c

index cfc83e3..ec63ac9 100644 (file)
@@ -407,7 +407,7 @@ failsafe_args_free(struct rte_eth_dev *dev)
        uint8_t i;
 
        FOREACH_SUBDEV(sdev, i, dev) {
-               rte_free(sdev->cmdline);
+               free(sdev->cmdline);
                sdev->cmdline = NULL;
                free(sdev->devargs.args);
                sdev->devargs.args = NULL;