]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: Assign NULL to the pointer after memory free.
authorAleksei Gimbitskii <aleksei.gimbitskii@intel.com>
Thu, 2 May 2019 09:59:22 +0000 (12:59 +0300)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 30 May 2019 09:21:57 +0000 (17:21 +0800)
commit51e5bbdb5200f21ed794fd3db919275344be486d
tree1e46ab47c568187bede5917b3770301a14f99e09
parentdab12e50fbab6e4a6ef96850a97ef9a639ba306a
drm/i915/gvt: Assign NULL to the pointer after memory free.

The klocwork static code analyzer complains about using pointer after
being freed, because further we pass it to the gvt_vgpu_err() function.
Assign pointer to be NULL intentionaly, to meet requirements of the code
analyzer.

This patch fixed the issue #648 reported as error by klocwork.

Acked-by: Colin Xu <colin.xu@intel.com>
Signed-off-by: Aleksei Gimbitskii <aleksei.gimbitskii@intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/gtt.c