When we destroy a datapath, we need to free its port groups also.
This is a fairly small memory leak: a few hundred bytes, at most, and
it only occurred each time a datapath was destroyed.
dp_table_destroy(dp->table, 1);
for (i = 0; i < DP_N_QUEUES; i++)
skb_queue_purge(&dp->queues[i]);
+ for (i = 0; i < DP_MAX_GROUPS; i++) {
+ struct odp_port_group *pg = dp->groups[i];
+ if (pg) {
+ kfree(dp->groups[i]->ports);
+ kfree(dp->groups[i]);
+ }
+ }
free_percpu(dp->stats_percpu);
kfree(dp);
module_put(THIS_MODULE);