1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Don't leak resources on duplicate -m or -M arguments. Last one wins.

CID: 1204385, 1204384
This commit is contained in:
Warner Losh 2017-12-28 05:32:59 +00:00
parent 8a97717048
commit 829ec26617
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327262

View File

@ -299,10 +299,12 @@ add_cmd(__unused int argc, char *argv[], ximgact_binmisc_entry_t *xbe)
break;
case 'm':
free(magic);
magic = strdup(optarg);
break;
case 'M':
free(mask);
mask = strdup(optarg);
xbe->xbe_flags |= IBF_USE_MASK;
break;