strdupa uses alloca to allocate the buffer free should not be used on space allocated with alloca, so remove these. Signed-off-by: John Kacur <jkacur@xxxxxxxxxx> --- src/pi_tests/pi_stress.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pi_tests/pi_stress.c b/src/pi_tests/pi_stress.c index 53c6af15afac..3888198f395b 100644 --- a/src/pi_tests/pi_stress.c +++ b/src/pi_tests/pi_stress.c @@ -1259,10 +1259,8 @@ int process_sched_line(const char *arg) k = strsep(&buf, del); } - if (!id) { - free(buf); + if (!id) return FAILURE; - } /* We do not validate the options, instead we pass all garbage * to the kernel and see what's happening */ @@ -1280,7 +1278,6 @@ int process_sched_line(const char *arg) retval = FAILURE; } - free(buf); return retval; } -- 2.31.1