Date: Tue, 01 Dec 2015 19:42:22 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 204943] usr/src/sbin/newfs_msdos/mkfs_msdos.c:586: memory leak ? Message-ID: <bug-204943-8-N0mRLiJZQR@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-204943-8@https.bugs.freebsd.org/bugzilla/> References: <bug-204943-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204943 NGie Cooper <ngie@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emaste@freebsd.org, | |ngie@FreeBSD.org --- Comment #1 from NGie Cooper <ngie@FreeBSD.org> --- Yes, this is a leak. This should fix it: $ svn diff sbin/newfs_msdos/mkfs_msdos.c Index: sbin/newfs_msdos/mkfs_msdos.c =================================================================== --- sbin/newfs_msdos/mkfs_msdos.c (revision 291608) +++ sbin/newfs_msdos/mkfs_msdos.c (working copy) @@ -583,6 +583,7 @@ si_sa.sa_handler = infohandler; if (sigaction(SIGINFO, &si_sa, NULL) == -1) { warn("sigaction SIGINFO"); + free(img); return -1; } for (lsn = 0; lsn < dir + (fat == 32 ? bpb.bpbSecPerClust : rds); lsn++) { -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-204943-8-N0mRLiJZQR>