Fix memory leaks.

CID:	1258582, 1258583.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Edward Tomasz Napierala 2015-01-05 15:34:23 +00:00
parent b28def2171
commit 3d2b0910d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276704
2 changed files with 2 additions and 1 deletions

View File

@ -85,6 +85,7 @@ fstyp_ext2fs(FILE *fp, char *label, size_t size)
}
strlcpy(label, s_volume_name, size);
free(fs);
return (0);
}

View File

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