summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-09-08 01:02:47 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-09-08 01:02:47 -0700
commit685da48af54200b61d16795319994ad1c9c74972 (patch)
tree62a0193975bb386d0018966df61272cf97144238
parentbb43045390695b7f16643e1367b61f5ca6b97359 (diff)
downloadtxr-685da48af54200b61d16795319994ad1c9c74972.tar.gz
txr-685da48af54200b61d16795319994ad1c9c74972.tar.bz2
txr-685da48af54200b61d16795319994ad1c9c74972.zip
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.
-rw-r--r--sysif.c2
1 files changed, 0 insertions, 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);