summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/fstyp/ext2fs.c1
-rw-r--r--usr.sbin/fstyp/ntfs.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/fstyp/ext2fs.c b/usr.sbin/fstyp/ext2fs.c
index df9e66e..09336e5 100644
--- a/usr.sbin/fstyp/ext2fs.c
+++ b/usr.sbin/fstyp/ext2fs.c
@@ -85,6 +85,7 @@ fstyp_ext2fs(FILE *fp, char *label, size_t size)
}
strlcpy(label, s_volume_name, size);
+ free(fs);
return (0);
}
diff --git a/usr.sbin/fstyp/ntfs.c b/usr.sbin/fstyp/ntfs.c
index c0a5c5c..9058410 100644
--- a/usr.sbin/fstyp/ntfs.c
+++ b/usr.sbin/fstyp/ntfs.c
@@ -108,7 +108,7 @@ fstyp_ntfs(FILE *fp, char *label, size_t size)
bf = (struct ntfs_bootfile *)read_buf(fp, 0, 512);
if (bf == NULL || strncmp(bf->bf_sysid, "NTFS ", 8) != 0)
- return (1);
+ goto fail;
mftrecsz = bf->bf_mftrecsz;
recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz);
OpenPOWER on IntegriCloud