diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2017-11-01 16:59:52 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-11-02 11:21:41 -0700 |
commit | 36e6714054534b552413ba3b8e7eab49f965dc29 (patch) | |
tree | d1e251ba9338b2515f077b403963796915f06ecb /ofproto/ofproto-dpif-trace.c | |
parent | d2cb0218d02646f740788e4b01587782fd8ca98f (diff) | |
download | openvswitch-36e6714054534b552413ba3b8e7eab49f965dc29.tar.gz |
ofproto/trace: Fix memory leak in oftrace_push_ct_state()
Free the allocated memory in the pop function.
Fixes: 0f2f05bbcf743 ("ofproto/trace: Add --ct-next option to ofproto/trace")
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-trace.c')
-rw-r--r-- | ofproto/ofproto-dpif-trace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c index d8a559ab6..d5da48e32 100644 --- a/ofproto/ofproto-dpif-trace.c +++ b/ofproto/ofproto-dpif-trace.c @@ -135,7 +135,9 @@ oftrace_pop_ct_state(struct ovs_list *next_ct_states) { struct oftrace_next_ct_state *s; LIST_FOR_EACH_POP (s, node, next_ct_states) { - return s->state; + uint32_t state = s->state; + free(s); + return state; } OVS_NOT_REACHED(); } |