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:40:18 +0000 (14:40 +0200)
commit466877f2d25758e5ad007b292c1f225520f8c877
tree62ecb81ca6f1ce2a4e6c6a255e51e600751a64a2
parent78c4244f8bdbf3cefa1e01bfcfe7a53bcc45c0f3
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