summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorIsaac Huang <[email protected]>2014-03-03 20:00:11 -0700
committerBrian Behlendorf <[email protected]>2014-08-20 10:45:16 -0700
commit0426c16804e572f088dd293029ab39fa75e1e203 (patch)
tree0285b5718f4d72a8e69d54c73be0e11b37a253a6 /include/sys
parentbd089c547784a4ab23fa20f307e8b23b0a622525 (diff)
Fixed memory leaks in zevent handling
Some nvlist_t could be leaked in error handling paths. Also make sure cb argument to zfs_zevent_post() cannnot be NULL. Signed-off-by: Isaac Huang <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2158
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/fm/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/fm/util.h b/include/sys/fm/util.h
index 18fe49073..6ee31764b 100644
--- a/include/sys/fm/util.h
+++ b/include/sys/fm/util.h
@@ -93,7 +93,7 @@ typedef struct zfs_zevent {
extern void fm_init(void);
extern void fm_fini(void);
extern void fm_nvprint(nvlist_t *);
-extern void zfs_zevent_post(nvlist_t *, nvlist_t *, zevent_cb_t *);
+extern int zfs_zevent_post(nvlist_t *, nvlist_t *, zevent_cb_t *);
extern void zfs_zevent_drain_all(int *);
extern int zfs_zevent_fd_hold(int, minor_t *, zfs_zevent_t **);
extern void zfs_zevent_fd_rele(int);