mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-07 06:56:56 +01:00
Stop the options string leak if it is not attached into the options
linked list. Obtained from: OpenBSD
This commit is contained in:
parent
9107643c54
commit
248825e568
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261181
@ -1385,6 +1385,7 @@ opt_add(const char *str)
|
||||
free(lstr);
|
||||
return(-1);
|
||||
}
|
||||
lstr = NULL; /* parts of string going onto the OPLIST */
|
||||
*pt++ = '\0';
|
||||
opt->name = frpt;
|
||||
opt->value = pt;
|
||||
@ -1400,6 +1401,7 @@ opt_add(const char *str)
|
||||
optail->fow = opt;
|
||||
optail = opt;
|
||||
}
|
||||
free(lstr);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user