diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-04-10 14:33:12 +0200 |
---|---|---|
committer | Zhenyu Wang <zhenyuw@linux.intel.com> | 2018-04-11 08:37:58 +0200 |
commit | ffdf16edfbbe77f5f5c3c87fe8d7387ecd16241b (patch) | |
tree | 7cf253e987475cda7ff01fd566c751ef1bf9cd8e /drivers | |
parent | drm/i915/gvt: fix user copy warning by whitelist workload rb_tail field (diff) | |
download | linux-ffdf16edfbbe77f5f5c3c87fe8d7387ecd16241b.tar.xz linux-ffdf16edfbbe77f5f5c3c87fe8d7387ecd16241b.zip |
drm/i915/gvt: fix memory leak of a cmd_entry struct on error exit path
The error exit path when a duplicate is found does not kfree and cmd_entry
struct and hence there is a small memory leak. Fix this by kfree'ing it.
Detected by CoverityScan, CID#1370198 ("Resource Leak")
Fixes: be1da7070aea ("drm/i915/gvt: vGPU command scanner")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index db6b94dda5df..6bd56ecda31c 100644 --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c @@ -2863,6 +2863,7 @@ static int init_cmd_table(struct intel_gvt *gvt) if (info) { gvt_err("%s %s duplicated\n", e->info->name, info->name); + kfree(e); return -EEXIST; } |