From 685da48af54200b61d16795319994ad1c9c74972 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 8 Sep 2021 01:02:47 -0700 Subject: poll: don't free array from alloca. * sysif.c (poll_wrap): April 23, 2020 commit f1ce6f6a40a45a719eb1bc3069f81127e5814dd8 left behind some stray free calls, which happen only in some error cases. Reported by Paul A. Patience, by way of GCC 11 testing. --- sysif.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysif.c b/sysif.c index 058cc407..2c8bc6b0 100644 --- a/sysif.c +++ b/sysif.c @@ -1494,7 +1494,6 @@ static val poll_wrap(val poll_list, val timeout_in) if (typep(obj, stream_s)) { val fdval = stream_fd(obj); if (!fdval) { - free(pfd); uw_throwf(file_error_s, lit("poll: stream ~s doesn't have a file descriptor"), obj, nao); @@ -1504,7 +1503,6 @@ static val poll_wrap(val poll_list, val timeout_in) } /* fallthrough */ default: - free(pfd); uw_throwf(file_error_s, lit("poll: ~s isn't a stream or file descriptor"), obj, nao); -- cgit v1.2.3