mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
Fixed small memory leak in ereport handling
One pre-check in zfs_ereport_start() was being called after the nvlists were being allocated. This simply corrects that issue. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #6140
This commit is contained in:
parent
a9f0d7dd89
commit
a32df59e18
@ -210,6 +210,12 @@ zfs_ereport_start(nvlist_t **ereport_out, nvlist_t **detector_out,
|
|||||||
(vd->vdev_remove_wanted || vd->vdev_state == VDEV_STATE_REMOVED))
|
(vd->vdev_remove_wanted || vd->vdev_state == VDEV_STATE_REMOVED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ((strcmp(subclass, FM_EREPORT_ZFS_DELAY) == 0) &&
|
||||||
|
(zio != NULL) && (!zio->io_timestamp)) {
|
||||||
|
/* Ignore bogus delay events */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((ereport = fm_nvlist_create(NULL)) == NULL)
|
if ((ereport = fm_nvlist_create(NULL)) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -218,12 +224,6 @@ zfs_ereport_start(nvlist_t **ereport_out, nvlist_t **detector_out,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(subclass, FM_EREPORT_ZFS_DELAY) == 0) &&
|
|
||||||
(zio != NULL) && (!zio->io_timestamp)) {
|
|
||||||
/* Ignore bogus delay events */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Serialize ereport generation
|
* Serialize ereport generation
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user