drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
authorDeepak Rawat <drawat@vmware.com>
Mon, 26 Jun 2017 12:39:08 +0000 (14:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:37:16 +0000 (14:37 +0200)
commit04686ab28a35842fce97a8ddfab8a8b00656f1e8
tree100598ea29643984e35b34426cf653d0ca4e32ef
parentc70e2006d06a868fb53d922e8b4057561774b081
drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr

commit 82fcee526ba8ca2c5d378bdf51b21b7eb058fe3a upstream.

The hash table created during vmw_cmdbuf_res_man_create was
never freed. This causes memory leak in context creation.
Added the corresponding drm_ht_remove in vmw_cmdbuf_res_man_destroy.

Tested for memory leak by running piglit overnight and kernel
memory is not inflated which earlier was.

Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c