Fix memory leak in check_disk()

Reviewed-by: Allan Jude <allanjude@freebsd.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #8897  
Closes #8911
This commit is contained in:
Michael Niewöhner 2019-06-19 20:53:37 +02:00 committed by Brian Behlendorf
parent c308b1dd63
commit 0b755ec3d5
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}