mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
can: gw: use kmem_cache_free() instead of kfree()
Memory allocated by kmem_cache_alloc() should be freed using kmem_cache_free(), not kfree(). Cc: linux-stable <[email protected]> # >= v3.2 Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Oliver Hartkopp <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
This commit is contained in:
parent
c802d75962
commit
3480a21259
1 changed files with 3 additions and 3 deletions
|
|
@ -466,7 +466,7 @@ static int cgw_notifier(struct notifier_block *nb,
|
|||
if (gwj->src.dev == dev || gwj->dst.dev == dev) {
|
||||
hlist_del(&gwj->list);
|
||||
cgw_unregister_filter(gwj);
|
||||
kfree(gwj);
|
||||
kmem_cache_free(cgw_cache, gwj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -864,7 +864,7 @@ static void cgw_remove_all_jobs(void)
|
|||
hlist_for_each_entry_safe(gwj, nx, &cgw_list, list) {
|
||||
hlist_del(&gwj->list);
|
||||
cgw_unregister_filter(gwj);
|
||||
kfree(gwj);
|
||||
kmem_cache_free(cgw_cache, gwj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -920,7 +920,7 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
|
|||
|
||||
hlist_del(&gwj->list);
|
||||
cgw_unregister_filter(gwj);
|
||||
kfree(gwj);
|
||||
kmem_cache_free(cgw_cache, gwj);
|
||||
err = 0;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue