Skip to content

Commit

Permalink
workqueue: use kmem_cache_free() instead of kfree()
Browse files Browse the repository at this point in the history
memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Wei Yongjun authored and Tejun Heo committed Apr 9, 2013
1 parent 5c52959 commit cece95d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -3750,7 +3750,7 @@ static void free_unbound_pwq(struct pool_workqueue *pwq)

if (pwq) {
put_unbound_pool(pwq->pool);
kfree(pwq);
kmem_cache_free(pwq_cache, pwq);
}
}

Expand Down

0 comments on commit cece95d

Please sign in to comment.