From: Liu Yuan <tailai...@taobao.com> free() struct reclaim_work instead of struct work.
Signed-off-by: Liu Yuan <tailai...@taobao.com> --- sheep/object_cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sheep/object_cache.c b/sheep/object_cache.c index f246ee3..fab6ad4 100644 --- a/sheep/object_cache.c +++ b/sheep/object_cache.c @@ -461,8 +461,7 @@ struct reclaim_work { static void do_reclaim(struct work *work) { - struct reclaim_work *rw = container_of(work, struct reclaim_work, - work); + struct reclaim_work *rw = container_of(work, struct reclaim_work, work); struct object_cache *cache; struct hlist_node *node; int i, j; @@ -494,8 +493,9 @@ static void do_reclaim(struct work *work) static void reclaim_done(struct work *work) { + struct reclaim_work *rw = container_of(work, struct reclaim_work, work); uatomic_set_false(&gcache.in_reclaim); - free(work); + free(rw); } static int create_dir_for(uint32_t vid) -- 1.7.9.5 -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog