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....@gmail.com> --- ofproto/ofproto-dpif-trace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c index d8a559ab6394..d5da48e326bb 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(); } -- 2.7.4 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev