diff options
author | Jarno Rajahalme <jrajahalme@nicira.com> | 2013-09-23 10:57:22 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-09-24 16:20:35 -0700 |
commit | ddeca9a44933e1f96938cca0dd2ab77b92dd2101 (patch) | |
tree | ab92965629edcb3047235c17a82bd3f2abcb40ca /ofproto/ofproto-dpif-upcall.h | |
parent | 2e6d002d967ffe795cda2f8c2cca15d3592f411f (diff) | |
download | openvswitch-ddeca9a44933e1f96938cca0dd2ab77b92dd2101.tar.gz |
ofproto-dpif-upcall: Fix a memory leak.
The "key" member in struct flow_miss refers to memory held by the "struct
upcall", hence the upcalls should be freed only after the flow misses are
processed by the main thread.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ofproto/ofproto-dpif-upcall.h')
-rw-r--r-- | ofproto/ofproto-dpif-upcall.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-upcall.h b/ofproto/ofproto-dpif-upcall.h index 9bd19ad52..cd97e79db 100644 --- a/ofproto/ofproto-dpif-upcall.h +++ b/ofproto/ofproto-dpif-upcall.h @@ -104,6 +104,11 @@ struct flow_miss_batch { struct hmap misses; unsigned int reval_seq; + + /* Flow misses refer to the memory held by "struct upcall"s, + * so we need to keep track of the upcalls to be able to + * free them when done. */ + struct list upcalls; /* Contains "struct upcall"s. */ }; struct flow_miss_batch *flow_miss_batch_next(struct udpif *); |