Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ upstream commit bb340f56fcb7bac9ec04c1c1ca7a2a4f3012c848 ] nfp_net_recv_pkts() should not return a value that less than 0 and the inappropriate return value in receive loop also causes the memory leak. Modify code to avoid return a value less than 0. Furthermore, When nfp_net_recv_pkts() break out from the receive loop because of packet problems, a rte_mbuf will not be freed and it will cause memory leak. Free the rte_mbuf before break out. Fixes: b812daa ("nfp: add Rx and Tx") Signed-off-by: Long Wu <long.wu@corigine.com> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com> Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
- Loading branch information