Fix memory leaks.
CID: 1258582, 1258583. MFC after: 1 month Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
b28def2171
commit
3d2b0910d2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276704
@ -85,6 +85,7 @@ fstyp_ext2fs(FILE *fp, char *label, size_t size)
|
||||
}
|
||||
|
||||
strlcpy(label, s_volume_name, size);
|
||||
free(fs);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user