Skip to content

Commit

Permalink
net/tap: fix memory leak on IPC request
Browse files Browse the repository at this point in the history
[ upstream commit 388e061 ]

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: c9aa56e ("net/tap: access primary process queues from secondary")

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
  • Loading branch information
hero24 authored and kevintraynor committed May 8, 2019
1 parent ae62bad commit 8f3e73d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/tap/rte_eth_tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,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;
}

Expand Down

0 comments on commit 8f3e73d

Please sign in to comment.