Date: Tue, 20 Jan 2015 20:42:56 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277436 - stable/10/usr.sbin/fstyp Message-ID: <201501202042.t0KKguFS020653@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Tue Jan 20 20:42:55 2015 New Revision: 277436 URL: https://svnweb.freebsd.org/changeset/base/277436 Log: MFC r276704: Fix memory leaks. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/fstyp/ext2fs.c stable/10/usr.sbin/fstyp/ntfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/fstyp/ext2fs.c ============================================================================== --- stable/10/usr.sbin/fstyp/ext2fs.c Tue Jan 20 20:41:32 2015 (r277435) +++ stable/10/usr.sbin/fstyp/ext2fs.c Tue Jan 20 20:42:55 2015 (r277436) @@ -85,6 +85,7 @@ fstyp_ext2fs(FILE *fp, char *label, size } strlcpy(label, s_volume_name, size); + free(fs); return (0); } Modified: stable/10/usr.sbin/fstyp/ntfs.c ============================================================================== --- stable/10/usr.sbin/fstyp/ntfs.c Tue Jan 20 20:41:32 2015 (r277435) +++ stable/10/usr.sbin/fstyp/ntfs.c Tue Jan 20 20:42:55 2015 (r277436) @@ -108,7 +108,7 @@ fstyp_ntfs(FILE *fp, char *label, size_t 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501202042.t0KKguFS020653>