diff options
-rw-r--r-- | net/core/pktgen.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 67870e9fd097..3b85c0dffa61 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -3544,13 +3544,12 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname) | |||
3544 | return -ENOMEM; | 3544 | return -ENOMEM; |
3545 | 3545 | ||
3546 | strcpy(pkt_dev->odevname, ifname); | 3546 | strcpy(pkt_dev->odevname, ifname); |
3547 | pkt_dev->flows = vmalloc_node(MAX_CFLOWS * sizeof(struct flow_state), | 3547 | pkt_dev->flows = vzalloc_node(MAX_CFLOWS * sizeof(struct flow_state), |
3548 | node); | 3548 | node); |
3549 | if (pkt_dev->flows == NULL) { | 3549 | if (pkt_dev->flows == NULL) { |
3550 | kfree(pkt_dev); | 3550 | kfree(pkt_dev); |
3551 | return -ENOMEM; | 3551 | return -ENOMEM; |
3552 | } | 3552 | } |
3553 | memset(pkt_dev->flows, 0, MAX_CFLOWS * sizeof(struct flow_state)); | ||
3554 | 3553 | ||
3555 | pkt_dev->removal_mark = 0; | 3554 | pkt_dev->removal_mark = 0; |
3556 | pkt_dev->min_pkt_size = ETH_ZLEN; | 3555 | pkt_dev->min_pkt_size = ETH_ZLEN; |