net/tap: fix memory leak on IPC request
authorHerakliusz Lipiec <herakliusz.lipiec@intel.com>
Thu, 25 Apr 2019 12:48:17 +0000 (13:48 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 3 May 2019 10:52:43 +0000 (12:52 +0200)
When sending synchronous IPC requests, the caller must free the response
buffer if the request was successful and reply is no longer needed.
Fix the code to correctly
use the IPC API.

Bugzilla ID: 228
Fixes: c9aa56edec8e ("net/tap: access primary process queues from secondary")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
drivers/net/tap/rte_eth_tap.c

index 7f74b5d..f8a4169 100644 (file)
@@ -2118,7 +2118,7 @@ tap_mp_attach_queues(const char *port_name, struct rte_eth_dev *dev)
                process_private->rxq_fds[queue] = reply->fds[fd_iterator++];
        for (queue = 0; queue < reply_param->txq_count; queue++)
                process_private->txq_fds[queue] = reply->fds[fd_iterator++];
-
+       free(reply);
        return 0;
 }