diff options
author | loli10K <[email protected]> | 2019-05-24 04:17:00 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-05-23 19:17:00 -0700 |
commit | 75c09c5060b85a144cc794ae857520662dc8fd58 (patch) | |
tree | fed3bab5926b4cc268eeed1299437a900de82bba /module/zfs/spa_misc.c | |
parent | 2d0077da6ded46fb9c8fc646904d23a54ad4d352 (diff) |
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 <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #8788
Diffstat (limited to 'module/zfs/spa_misc.c')
-rw-r--r-- | module/zfs/spa_misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index dddbe9cfa..a111a9e4e 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -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 |