Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b5f792a authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller
Browse files

pktgen: do not access flows[] beyond its length



typo -- pkt_dev->nflows is for stats only, the number of concurrent
flows is stored in cflows.

Reported-By: default avatarVladimir Ivashchenko <hazard@francoudi.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c40499e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2447,7 +2447,7 @@ static inline void free_SAs(struct pktgen_dev *pkt_dev)
	if (pkt_dev->cflows) {
		/* let go of the SAs if we have them */
		int i = 0;
		for (;  i < pkt_dev->nflows; i++){
		for (;  i < pkt_dev->cflows; i++) {
			struct xfrm_state *x = pkt_dev->flows[i].x;
			if (x) {
				xfrm_state_put(x);