diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2015-07-08 17:25:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-22 14:49:42 -0700 |
commit | 91b725600d8f27d759d211e36dda6182c6f93ec6 (patch) | |
tree | f5728f755af008653325586dac00b24226d4af98 /crypto/vmac.c | |
parent | 2d64f31bdfbb2ea66cbd4271c079f11808c79c28 (diff) | |
download | op-kernel-dev-91b725600d8f27d759d211e36dda6182c6f93ec6.zip op-kernel-dev-91b725600d8f27d759d211e36dda6182c6f93ec6.tar.gz |
cdc-acm: Destroy acm_minors IDR on module exit
Destroy acm_minors IDR on module exit, reclaiming the allocated memory.
This was detected by the following semantic patch (written by Luis Rodriguez
<mcgrof@suse.com>)
<SmPL>
@ defines_module_init @
declarer name module_init, module_exit;
declarer name DEFINE_IDR;
identifier init;
@@
module_init(init);
@ defines_module_exit @
identifier exit;
@@
module_exit(exit);
@ declares_idr depends on defines_module_init && defines_module_exit @
identifier idr;
@@
DEFINE_IDR(idr);
@ on_exit_calls_destroy depends on declares_idr && defines_module_exit @
identifier declares_idr.idr, defines_module_exit.exit;
@@
exit(void)
{
...
idr_destroy(&idr);
...
}
@ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @
identifier declares_idr.idr, defines_module_exit.exit;
@@
exit(void)
{
...
+idr_destroy(&idr);
}
</SmPL>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Oliver Neukum <oneukum@suse.com>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/vmac.c')
0 files changed, 0 insertions, 0 deletions