lkml.org 
[lkml]   [2021]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][V2][next] drm/vmwgfx: Fix memory allocation check and a leak of object fifo
From
Date
On 5/14/21 10:49 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The allocation of fifo is lacking an allocation failure check, so
> fix this by adding one.
>
> In the case where fifo->static_buffer fails to be allocated the
> error return path neglects to kfree the fifo object. Fix this by
> adding in the missing kfree.
>
> Kudos to Dan Carpenter for spotting the missing kzalloc failure
> check.
>
> Addresses-Coverity: ("Resource leak")
> Fixes: 2cd80dbd3551 ("drm/vmwgfx: Add basic support for SVGA3")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>
> V2: Add missing allocation failure check
> Update $SUBJECT to reflect this extra change

Looks good. Thanks. I'll push it through drm-misc-next.

z

\
 
 \ /
  Last update: 2021-05-14 20:33    [W:0.047 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site