flex icon indicating copy to clipboard operation
flex copied to clipboard

A potential bug of memory leak

Open ash1852 opened this issue 4 years ago • 0 comments

step 1 : In file flex/src/regex.c , function regmatch_dup line 80 : Allocate memory to str

step 2 : In file flex/src/regex.c , function regmatch_dup line 81 : Select the false branch at this point (str==null is false)

step 3 : In file flex/src/regex.c , function regmatch_strtol line 142 : Function regmatch_dup executes and stores the return value to s

step 4 : In file flex/src/regex.c , function regmatch_strtol line 146 : Select the false branch at this point (s!=buf[0] is false), the allocated memory is leaked

ash1852 avatar Sep 25 '21 02:09 ash1852