From: Ben Pfaff <b...@ovn.org> recirc_alloc_id__() copies the stack nothing ever freed it.
This patch is adopted from the corresponding commit 85b9cb2 on master. CC: Ben Pfaff <b...@ovn.org> CC: Andy Zhou <az...@ovn.org> Reported-by: William Tu <u9012...@gmail.com> Reported-at: http://openvswitch.org/pipermail/dev/2016-January/064040.html Signed-off-by: Jarno Rajahalme <ja...@ovn.org> --- ofproto/ofproto-dpif-rid.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif-rid.c b/ofproto/ofproto-dpif-rid.c index f1b3bdc..b840ea1 100644 --- a/ofproto/ofproto-dpif-rid.c +++ b/ofproto/ofproto-dpif-rid.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015 Nicira, Inc. + * Copyright (c) 2014, 2015, 2016 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,8 @@ static uint32_t next_id OVS_GUARDED_BY(mutex); /* Possible next free id. */ #define RECIRC_POOL_STATIC_IDS 1024 +static void recirc_id_node_free(struct recirc_id_node *); + void recirc_init(void) { @@ -88,7 +90,7 @@ recirc_run(void) * finished. */ LIST_FOR_EACH_POP (node, exp_node, &expired) { cmap_remove(&id_map, &node->id_node, node->id); - ovsrcu_postpone(free, node); + ovsrcu_postpone(recirc_id_node_free, node); } if (!list_is_empty(&expiring)) { @@ -315,6 +317,13 @@ recirc_alloc_id(struct ofproto_dpif *ofproto) return node->id; } +static void +recirc_id_node_free(struct recirc_id_node *node) +{ + ofpbuf_delete(node->stack); + free(node); +} + void recirc_id_node_unref(const struct recirc_id_node *node_) OVS_EXCLUDED(mutex) -- 2.1.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev