lkml.org 
[lkml]   [2018]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] gdrom: fix a memory leak bug
From
Date
On 12/26/18 7:15 PM, Wenwen Wang wrote:
> In probe_gdrom(), the buffer pointed by 'gd.cd_info' is allocated through
> kzalloc() and is used to hold the information of the gdrom device. To
> register and unregister the device, the pointer 'gd.cd_info' is passed to
> the functions register_cdrom() and unregister_cdrom(), respectively.
> However, this buffer is not freed after it is used, which can cause a
> memory leak bug.
>
> This patch simply frees the buffer 'gd.cd_info' in exit_gdrom() to fix the
> above issue.

Applied, thanks.

--
Jens Axboe

\
 
 \ /
  Last update: 2018-12-29 16:22    [W:0.044 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site