Date: Thu, 28 Dec 2017 05:33:00 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327262 - head/usr.sbin/binmiscctl Message-ID: <201712280533.vBS5X0eY024029@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Thu Dec 28 05:32:59 2017 New Revision: 327262 URL: https://svnweb.freebsd.org/changeset/base/327262 Log: Don't leak resources on duplicate -m or -M arguments. Last one wins. CID: 1204385, 1204384 Modified: head/usr.sbin/binmiscctl/binmiscctl.c Modified: head/usr.sbin/binmiscctl/binmiscctl.c ============================================================================== --- head/usr.sbin/binmiscctl/binmiscctl.c Thu Dec 28 03:10:57 2017 (r327261) +++ head/usr.sbin/binmiscctl/binmiscctl.c Thu Dec 28 05:32:59 2017 (r327262) @@ -299,10 +299,12 @@ add_cmd(__unused int argc, char *argv[], ximgact_binmi break; case 'm': + free(magic); magic = strdup(optarg); break; case 'M': + free(mask); mask = strdup(optarg); xbe->xbe_flags |= IBF_USE_MASK; break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712280533.vBS5X0eY024029>