From a79022a840d39d518ebe840b59d2287476451fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= Date: Wed, 19 Jun 2019 20:53:37 +0200 Subject: [PATCH] Fix memory leak in check_disk() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Allan Jude Reviewed-by: Tony Hutter Reviewed-by: Richard Elling Signed-off-by: Michael Niewöhner Closes #8897 Closes #8911 --- cmd/zpool/zpool_vdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c index 7ea9d742006d..52c696816f73 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c @@ -433,6 +433,7 @@ check_disk(const char *path, blkid_cache cache, int force, char *value = blkid_get_tag_value(cache, "TYPE", path); (void) fprintf(stderr, gettext("%s is in use and contains " "a %s filesystem.\n"), path, value ? value : "unknown"); + free(value); return (-1); }