I maked a experiment by invoking tpmd_connect and tpmd_disconnect many times. Then, i found memory leak by entering command "cat /proc/slabinfo | grep sock_inode_cache".
After studing the the code of function sock_release, i realized tpmd_sock->ops->release not free memory. Free memory is realized by iput(SOCK_INODE(sock)).
So, i think we should use sock_release instand of tpmd_sock->ops->release.
I maked a experiment by invoking tpmd_connect and tpmd_disconnect many times. Then, i found memory leak by entering command "cat /proc/slabinfo | grep sock_inode_cache". After studing the the code of function sock_release, i realized tpmd_sock->ops->release not free memory. Free memory is realized by iput(SOCK_INODE(sock)). So, i think we should use sock_release instand of tpmd_sock->ops->release.