mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
driver core: firmware_class:fix memory leak of page pointers array
The page pointers array is allocated in fw_realloc_buffer() called by firmware_data_write(), and should be freed in release function of firmware device. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Reported-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0f58b44582
commit
3b4418c67a
1 changed files with 0 additions and 1 deletions
|
@ -180,7 +180,6 @@ static ssize_t firmware_loading_store(struct device *dev,
|
|||
goto err;
|
||||
}
|
||||
/* Pages will be freed by vfree() */
|
||||
fw_priv->pages = NULL;
|
||||
fw_priv->page_array_size = 0;
|
||||
fw_priv->nr_pages = 0;
|
||||
complete(&fw_priv->completion);
|
||||
|
|
Loading…
Reference in a new issue