mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Don't leak resources on duplicate -m or -M arguments. Last one wins.
CID: 1204385, 1204384
This commit is contained in:
parent
8a97717048
commit
829ec26617
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327262
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue