diff options
author | Igor K <[email protected]> | 2019-02-19 22:15:22 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-02-19 11:15:22 -0800 |
commit | 790c880e8c175424144f8d21c2355f8be1654be4 (patch) | |
tree | d14292ce4ffdff473fd855c1bfca515765e9cb27 | |
parent | 435637d1ed9ad8c6e521786f343c5ade7ce552c4 (diff) |
Fix zdb crash
We have to use umem_free() instead of free() if we are using
umem_zalloc()
Reviewed-by: Olaf Faaland <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Igor Kozhukhov <[email protected]>
Closes #8402
-rw-r--r-- | lib/libzpool/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzpool/util.c b/lib/libzpool/util.c index 87772bcb7..ad05d2239 100644 --- a/lib/libzpool/util.c +++ b/lib/libzpool/util.c @@ -105,7 +105,7 @@ show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent) vs->vs_space ? 6 : 0, vs->vs_space ? avail : "", rops, wops, rbytes, wbytes, rerr, werr, cerr); } - free(v0); + umem_free(v0, sizeof (*v0)); if (nvlist_lookup_nvlist_array(nv, ctype, &child, &children) != 0) return; @@ -124,7 +124,7 @@ show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent) if (nvlist_lookup_uint64(cnv, ZPOOL_CONFIG_NPARITY, &np) == 0) tname[strlen(tname)] = '0' + np; show_vdev_stats(tname, ctype, cnv, indent + 2); - free(tname); + umem_free(tname, len); } } |