Fix Address of stack memory associated with local variable 'flag' is still
referred to by the global variable 'long_options' upon returning to the caller. This will be a dangling reference Found by Clang Analyzer
This commit is contained in:
parent
ed5339953e
commit
7730b13e5a
|
@ -638,7 +638,7 @@ Options:
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
while(1) {
|
while(1) {
|
||||||
int flag = 0;
|
static int flag = 0;
|
||||||
static option long_options[] = {
|
static option long_options[] = {
|
||||||
{"requests", required_argument, nullptr, 'n'},
|
{"requests", required_argument, nullptr, 'n'},
|
||||||
{"clients", required_argument, nullptr, 'c'},
|
{"clients", required_argument, nullptr, 'c'},
|
||||||
|
|
Loading…
Reference in New Issue