HomeFreeBSD

Fix coverity defects: CID 184285

Description

Fix coverity defects: CID 184285

CID 184285: Read from pointer after free (USE_AFTER_FREE)

This patch fixes an use-after-free in vdev_config_generate_stats()
moving the kmem_free() call at the end of the function.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #8120

Details

Provenance
LOLi <loli10K@users.noreply.github.com>Authored on Nov 12 2018, 2:09 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 12 2018, 2:09 AM
Parents
rGecd3728b264b: Fix systemd spec file macros
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGc8fd652ce7ab: Fix coverity defects: CID 184285 (authored by LOLi <loli10K@users.noreply.github.com>).Nov 12 2018, 2:09 AM