mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-12 19:20:28 +03:00
Fix coverity defects: CID 186143
CID 186143: Memory - illegal accesses (USE_AFTER_FREE) This patch fixes an use-after-free in spa_import_progress_destroy() moving the kmem_free() call at the end of the function. Reviewed-by: Chris Dunlop <chris@onthe.net.au> Reviewed-by: Giuseppe Di Natale <guss80@gmail.com> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #8788
This commit is contained in:
parent
2d0077da6d
commit
75c09c5060
@ -2102,8 +2102,8 @@ spa_import_progress_destroy(void)
|
||||
spa_history_list_t *shl = spa_import_progress_list;
|
||||
procfs_list_uninstall(&shl->procfs_list);
|
||||
spa_import_progress_truncate(shl, 0);
|
||||
kmem_free(shl, sizeof (spa_history_list_t));
|
||||
procfs_list_destroy(&shl->procfs_list);
|
||||
kmem_free(shl, sizeof (spa_history_list_t));
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user