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
commit594ff00bcf230fd916dd710e83fe66d071abf0c6 (patch)
tree62a0193975bb386d0018966df61272cf97144238
parent7f32442862bfc785e613af33d48d1a4a4dae8835 (diff)
downloadtxr-594ff00bcf230fd916dd710e83fe66d071abf0c6.tar.gz
txr-594ff00bcf230fd916dd710e83fe66d071abf0c6.tar.bz2
txr-594ff00bcf230fd916dd710e83fe66d071abf0c6.zip
poll: don't free array from alloca.
* sysif.c (poll_wrap): April 23, 2020 commit 7fbf6b853893f65193ea9c81cf467be08c651244 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);